Count number of times a text occurs

L

Lee

I want to count the number of times a text occurs in a range and then put
1,2,3,ect in a cell adjacent to the occurance.
Apple 1
Apple 2
Apple 3
Apple 4
Banana 1
Banana 2
Banana 3
I can use the count function but it doesn't seem to help with the numbering.
It seems like it should be simple but it probably isn't.
Thanks for any help.
 
D

Don Guillett

Glad to help
The $h$2 anchors at the first cell to count. Then you look from there down
and check each cell against that.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
[email protected]
Lee said:
Thanks, it works very well. I don't understand why but it does work.
Thanks,
Lee
 
Top