Count duplicates and display order of occurence

微笑、不失礼 提交于 2019-12-12 03:40:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!