SOLVED

Need help ordering duplicated values in table

Copper Contributor

Hello! I have a table with thousands of duplicate IDs and I am trying to create an sequential order to show how many times the IDs are listed. The CountIF function gives me the total count listed on each row and that is not what I am looking for. Any help is much appreciated. Thank you! 

 

MBR_CONTR_EXT_IDCountIfWhat I want
800117684-0011
800117800-0021
800117800-0022
800117805-0021
800117818-0021
800117921-0011
800117979-0011
800118080-0021
800118080-0022
800118207-0011
800118291-0011
800118294-0011
800118308-0041
800118308-0042
800118528-0011
800118627-0011
800118730-0021
800118746-0031
800118747-0051
800118747-0052
800118747-0053
800118797-0051
800118797-0052
800118797-0053
800118797-0054
800118797-0055
4 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@BSantos0312 

Perhaps like this:

=COUNTIF($A$2:A2,A2)

@BSantos0312 

A 365 solution with MAP:

MBR_CONTR_EXT_ID is defined as a dynamic item

=LET(
    seq, SEQUENCE(ROWS(MBR_CONTR_EXT_ID)),
    CountID, LAMBDA(s, ID, COUNTIF(TAKE(MBR_CONTR_EXT_ID, s), ID)),
    MAP(seq, MBR_CONTR_EXT_ID, CountID)
)

Patrick2788_0-1715177761433.png

 

 

 

@OliverScheurich this worked!! Thank you!

@Patrick2788 , @BSantos0312 

As variant

=LET(
    rng, MBR_CONTR_EXT_ID,
    n, ROWS(rng),
    SumIt, LAMBDA(v, SUM(v) ),
    BYROW( (TRANSPOSE(rng)=rng )*
           (SEQUENCE(n) >= SEQUENCE(,n) ),
           SumIt
    )
)
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@BSantos0312 

Perhaps like this:

=COUNTIF($A$2:A2,A2)

View solution in original post