Find duplicates and number them.

Solved
Emmy-lo -  
 Emmy-lo -
Hello,

I just got a tricky question at work and I can't seem to find the solution.

I can only count the duplicates using 'COUNTIFS', but I would like to number them.

To explain, in column A there are different numbers that sometimes appear multiple times, so I would like to identify these duplicates and automatically number them in order.

For example, '57' appears 4 times in the list (though not consecutively), how can I automatically have '1', '2', '3', and '4' appear in column B?

Maybe it's not possible.

In any case, thank you for considering my request!

Best regards,
Emmy

Configuration: Windows / Firefox 60.0

2 answers

  1. via55 Posted messages 14393 Registration date   Status Member Last intervention   2 759
     
    Hello Emmy

    One way to number the duplicates and know the count of each type:
    In B2 enter the formula: = COUNTIF($A$1:A1, A1)"/"&COUNTIF(A:A, A1) and drag it down the column

    Best regards
    Via

    --
    "Imagination is more important than knowledge." A. Einstein
    5
    1. Emmy-lo
       
      Hello Via,

      Your formula is magical!!
      Thank you very much!!

      Best regards,
      Emmy
      0
  2. danielc0 Posted messages 2192 Registration date   Status Member Last intervention   287
     
    Hello,

    Put this formula in B1 and drag it down:

    =IF(COUNTIF($A$1:A1,A1)>1,COUNTIF($A$1:A1,A1)-1,"")

    Daniel
    2
    1. Emmy-lo
       
      Hello Daniel,
      Your formula is perfect, but the results are shifted one cell down, is that normal, or did I do something wrong?

      Thank you :)
      0
    2. danielc0 Posted messages 2192 Registration date   Status Member Last intervention   287
       
      It's a matter of interpretation. For me, the first duplicate is the second value. The second has the value 1 because it's the first duplicate. At least, that's how I see it.
      0
    3. Emmy-lo
       
      Ahh okay.
      Thank you very much!
      0