Forum Discussion

Rogelio Emmanuel Valtierra Ayala's avatar
Aug 06, 2018
Solved

How can I put an identification number to Exel data ???

How can I put a data identification number in Exel ???? I have a problem... I have a database, where I have different products, and I need to assign an identification number to these products to be a...
  • Philip West's avatar
    Aug 06, 2018

    =IF(COUNTIF($B$1:B2, B2)  >1,INDEX($A$1:A1,MATCH(B2,$B$1:B1,0)),MAX($A$1:A1)+1)

     

    Check if we have already seen this item, if we have look up what its ID is, if not get that largest ID so far and +1

     

    I've attached a worksheet with it working.

     

    Just watch out, if you add new rows in the middle of the column you might change the ID of things below.

Resources