+ Reply to Thread
Results 1 to 3 of 3

Assign incremental numbers to matching Invoice numbers

  1. #1
    Registered User
    Join Date
    01-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Assign incremental numbers to matching Invoice numbers

    I have a list of Invoice numbers (6000 +) that have many duplicates. I need a formla in column B to assign incremental values (numbers) to all of the same invoice numbers in column A. So if there are 5 of the same invoices#'s in column A, those 5 will all have the same value assigned. Incrementing the numbers assigned will allow me to have a runnng count of invoices

    A B
    Invoice# Expected Result

    802951-1330 1
    802951-0640 2
    802951-1330 1
    802951-0640 2
    802951-1330 1
    802951-0640 2
    802951-1330 1
    802976-3040 3
    802976-3040 3
    802976-3040 3
    802976-3040 3


    As you can see, some of the same invoices may be located in differeant rows throughout the list. I'm thinking of maybe a VLookup + Match or something like that, but not real sure how to start.


    Thanks in advance.
    Last edited by berger01; 03-06-2013 at 09:24 AM. Reason: reduce invoice number length for simplicity

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Assign incremental numbers to matching Invoice numbers

    hi berger01. assuming data starts in A2, try this array formula:
    =IF(COUNTIF(A$2:A2,A2)=1,SUM(SIGN(FREQUENCY(MATCH(A$2:A2,A$2:A2,0),ROW(A$2:A2)-ROW($A$2)+1))),VLOOKUP(A2,A$1:B1,2,0))

    ...confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    01-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Assign incremental numbers to matching Invoice numbers

    Pure Genius! Thanks so much

+ 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