Calculate Occurrence Number - Excel

前端 未结 3 1336
小鲜肉
小鲜肉 2021-01-28 18:12

I have simple problem, but I\'ve not be able to get an answer from searching. I require a column to calculate the number of the nth occurrence of a value. It\'s best explained i

3条回答
  •  伪装坚强ぢ
    2021-01-28 18:46

    Use the following formula to generate the required series: =COUNTIF($A$1:A1,A1) and strech(copy) it in all the cells

    This will generate result like this:

    A   1   COUNTIF($A$1:A1,A1)
    A   2   COUNTIF($A$1:A2,A2)
    C   1   COUNTIF($A$1:A3,A3)
    C   2   COUNTIF($A$1:A4,A4)
    B   1   COUNTIF($A$1:A5,A5)
    B   2   COUNTIF($A$1:A6,A6)
    A   3   COUNTIF($A$1:A7,A7)
    C   3   COUNTIF($A$1:A8,A8)
    D   1   COUNTIF($A$1:A9,A9)
    D   2   COUNTIF($A$1:A10,A10)
    D   3   COUNTIF($A$1:A11,A11)
    D   4   COUNTIF($A$1:A12,A12)
    

提交回复
热议问题