# Finding the duplicate occurrences and displaying their frequency in descending order

1. ## Finding the duplicate occurrences and displaying their frequency in descending order

Hi,

i have a set of data in excel as followes:

A B
16 12
14 1
5 3
16 43
1 14
3 5
5 3
the desired solution that i am looking to get in c and d and e is as followes:
C D E
3 5 3
14 1 2

in the above example at the top there is 3 in c1 and 5 in d1 because it has occurred 3 times in the data also their frequency is displayed in e1 as 3 because it has occurred three times and c2 is 14 and d2 is 1 because it has occurred 2 times also their frequency is displayed in e2 as 2 as it has occurred 2 times in the data.

I have also attached a workbook to receive some solutions , so hoping to receive genuine response from serious contributors.

Thanks

2. ## Re: Finding the duplicate occurrences and displaying their frequency in descending order

C2:D2
=INDEX(A\$1:A\$7,SMALL(IF(COUNTIFS(\$A\$1:\$A\$7,\$A\$1:\$A\$7,\$B\$1:\$B\$7,\$B\$1:\$B\$7)+COUNTIFS(\$A\$1:\$A\$7,\$B\$1:\$B\$7,\$B\$1:\$B\$7,\$A\$1:\$A\$7)=\$E2,ROW(\$A\$1:\$A\$7)),COUNTIFS(\$E\$2:\$E2,\$E2)))

E2
=LARGE(COUNTIFS(\$A\$1:\$A\$7,\$A\$1:\$A\$7,\$B\$1:\$B\$7,\$B\$1:\$B\$7)+COUNTIFS(\$A\$1:\$A\$7,\$B\$1:\$B\$7,\$B\$1:\$B\$7,\$A\$1:\$A\$7),IF(ROW(E2)=1,1,1+SUM(\$E1:E1)))

**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

3. ## Re: Finding the duplicate occurrences and displaying their frequency in descending order

Hi
With helper columns:

C1 and down
``Please Login or Register  to view this content.``
D1 and down:
``Please Login or Register  to view this content.``
E1 and down:
``Please Login or Register  to view this content.``
G1 and down:
``Please Login or Register  to view this content.``
H1 and down:
``Please Login or Register  to view this content.``
I1 and down:
``Please Login or Register  to view this content.``

There are currently 1 users browsing this thread. (0 members and 1 guests)