mardi 22 juin 2021

Excel If statement to assign a unique value to all columns dependent on First and Last name?

So I have a huge excel sheet of contact info with 30,000+ rows and I'm trying to assign each contact a unique ID based on their First and Last name (separate columns).

The statement I have right now for assigning unique values is

IF(D3=D2),E2,E2+1)

Column D = Last Name Column E = ID

The statement works, but it only assigns value based on last name and is reliant on only the value of the cell above. There are contacts that have their name in multiple locations, thus the formula will give the same contact multiple IDs.

What I want to do is write a statement that assigns a unique value to a contact based on first AND last name (Columns C & D), and also have the formula assess the entire worksheet for the IF statement, rather than just the value in the cell above.

Hopefully I explained that clearly, any help is appreciated. Thanks!

Aucun commentaire:

Enregistrer un commentaire