I have a list of members (people) of an association.
Some member companies have one member others a=have many.
I need to number the unique/distinct companies.
For example. Here is a list of lines from the worksheet.
ABC Inc
ABC Inc
ABC Inc
Big Top LLC
Big Top LLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Callhans PLLC
Davis & Davis
Eaden Supply
Eaden Supply
Eaden Supply
I would like to number each company as such
ABC Inc 1
ABC Inc 1
ABC Inc 1
Big Top LLC 2
Big Top LLC 2
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Callhans PLLC 3
Davis & Davis 4
Eaden Supply 5
Eaden Supply 5
Eaden Supply 5
Can anybody help me out with a formula? I'm on a mac so no VBA please.
If you data is not sorted, then you can use this approach. Enter this formula![enter image description here](https://i.stack.imgur.com/rIsJa.png)
=IF(COUNTIF(A$2:A2,A2)=1,MAX(B$1:B1)+1,VLOOKUP(A2,A$1:B1,2,0))
inB2
cell and drag it to the end.Put the number 1 in the first cell (
B1
), then put this formula below it and drag it down:=IF(A2=A1,B1,B1+1)