+ Reply to Thread
Results 1 to 4 of 4

Count number of instances of an act. #

Hybrid View

  1. #1
    Registered User
    Join Date
    02-26-2007
    Posts
    22

    Count number of instances of an act. #

    I have a spreadsheet that has account numbers of the customer for each order they place. I would like to add a column to the left of the account number column and would like it to display the number of instances of the account in the cell in the same row as the first instance of the account (in the new column).


    New column ..........Act.#
    2 ................... 354
    .......................354
    4 ...................355
    ........................355
    .......................355
    .......................355


    Something like that but for 55,000 rows. Any ideas?

    Then, using the number in the left column, i would like to automatically run a presaved macro corresponding to that number. Ive got macros 1-12 and i need a macro that will query the left column number and then run the corresponding macro.
    Thanx Guys!
    Last edited by walke2jd; 07-03-2007 at 11:03 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695
    Are all duplicate account numbers in groups as per your example? If so then assuming the account numbers are in B2 down use this formula in A2 copied down

    =IF(B2<>B1,COUNTIF(B2:B$55000,B2),"")

    If account numbers are in any order try

    =IF(COUNTIF(B$2:B2,B2)=1,COUNTIF(B2:B$55001,B2),"")

  3. #3
    Registered User
    Join Date
    02-26-2007
    Posts
    22
    Any ideas on how to auto run the right macro using that number?

    Ive got a macro for each number of instances 1 - 12. So if there are 3 instances of account 357, I need it to choose macro "three" and run it.

    Any ideas?

    Thanx!

  4. #4
    Registered User
    Join Date
    02-26-2007
    Posts
    22
    Any ideas on how to auto run the right macro using that number?

    Ive got a macro for each number of instances 1 - 12. So if there are 3 instances of account 357, I need it to choose macro "three" and run it.

    Any ideas?

    Thanx!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1