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 able to identify them more easily and at the same time transfer them to another sheet.

 

EXAMPLE :

 

mac 
kaiser 
mac 
epson 
epson 
mac 
kaiser 

1 mac 
2 kaiser 
1 mac 
3 epson 
3 epson 
1 mac 
2 kaise

  • =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.

  • Philip West's avatar
    Philip West
    Steel Contributor

    =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