Create Distinct ID by Group in Excel without sorting -


i have excel column cannot sorted , need create unique id group, similar below:

+--------+------+ |  name  | id   | +--------+------+ | jim    |    1 | | sarah  |    1 | | tim    |    1 | | jim    |    2 | | rachel |    1 | | sarah  |    2 | | jim    |    3 | | sarah  |    3 | | rachel |    2 | | tim    |    2 | +--------+------+ 

you can simple countif() , getting little creative cell references:

=countif($a$1:$a1, a2) + 1 

put in b2 (assuming list headers starts in a1) , copy down.

countif() here counting number of times name in adjacent cell has appears in of cells above it. copy down, range grow include cells between a1 , next row up.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -