Assigning item's serial number

  • Hi,


    I have a list of items, which looks approximately like that:


    Item Name:
    Item A
    Item A
    Item B
    Item B
    Item B
    Item B
    Item B
    Item C
    Item C


    There are ~4,000 items in my list and ~2,500 of them are unique items. In the above list unique items are Item A, B and C.
    I need to get a code which will assign a serial number to each item. The desired list should look like that:


    Item Name: Item Serial Number:
    Item A 1
    Item A 2
    Item B 1
    Item B 2
    Item B 3
    Item B 4
    Item B 5
    Item C 1
    Item C 2


    Your help would be much appreciated

  • Re: Assigning item's serial number


    Hi AlexeyY,


    Welcome to Ozgrid!!


    You don't need code for this as you can do this via the following formula (as long as the data starts in Row 2 and is presented as you show it above):


    =IF(A2<>A1,1,B1+1)


    Regards,


    Robert

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!