问题
I am attempting to count the number of occurrences of each value within a column and then output the order in which it was found (top to bottom) with unsorted data. I have been unable to find a suitable formula to accomplish this task. Any assistance is greatly appreciated.
Example:
Number DuplicateIndex
50 1
20 1
30 1
10 1
30 2
40 1
30 3
50 2
回答1:
Try,
=countif(A$2:A2, A2)
, in B2 and fill down.
回答2:
Try, In B2 and fill down
=unique(A2:A9)
In C2 and fill down
=countif(A$2:A9, B2)
来源:https://stackoverflow.com/questions/37426298/count-duplicates-and-display-order-of-occurence