Suppose I have a list of animal types in Col A going down the rows, for example: cat, dog, dog, elephant, ferret, ferret, ferret, zebra, etc
In Col B I want to count how many times each of the SAME entry occurs, but rather than just doing "COUNTIF" (which would give the same value for each of the same entry) I need the list to count upwards consecutively each time another example of the same entry is found. So for instance with "ferret", column A would consist of "Ferret", "Ferret", "Ferret", and the corresponding column B entries would be 1, 2 and 3.
The entries are currently sorted alphabetically so the duplicates are next to each other in terms of rows. It'd be best if this didn't need to happen but okay if it does as it's easy enough to sort the list.
I know I've seen a formula somewhere else that does this (using an array formula of some kind) but I'll be damned if I can find it anywhere.
Can anyone provide a solution?
Many thanks
-Rob
Bookmarks