Count Repeated Numbers

bdtran

New Member
Joined
Oct 11, 2018
Messages
33
Hello All,

I need help with a formula to count the repeating for each number in multiple columns as shown the table in data range A1:X1.
The result that I am looking for is as in the range Z1:AE1 where the number with higher repeating count on the left. For example Z1=5-3 where #3 with higher repeating count of five times in the data range.

Thank you for all the helps.
BDT

[TABLE="class: grid, width: 622"]
<colgroup><col><col><col><col><col span="2"><col span="2"><col><col><col><col><col><col span="2"><col><col><col><col span="2"><col><col><col><col><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[TD]Q[/TD]
[TD]R[/TD]
[TD]S[/TD]
[TD]T[/TD]
[TD]U[/TD]
[TD]V[/TD]
[TD]W[/TD]
[TD]X[/TD]
[TD]Y[/TD]
[TD]Z[/TD]
[TD]AA[/TD]
[TD]AB[/TD]
[TD]AC[/TD]
[TD]AD[/TD]
[TD]AE[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]1[/TD]
[TD]25[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]45[/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]25[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]45[/TD]
[TD][/TD]
[TD]45[/TD]
[TD]9[/TD]
[TD]Result >[/TD]
[TD]5-3[/TD]
[TD]3-2[/TD]
[TD]3-45[/TD]
[TD]2-1[/TD]
[TD]2-25[/TD]
[TD]1-9[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
A tweak to Aryatect's formula to make it slightly shorter:

Code:
=IFERROR(AGGREGATE(14,6,(COUNTIF($A$1:$X$1,$A$1:$X$1)&"."&$A$1:$X$1)/(MATCH($A$1:$X$1,$A$1:$X$1,0)=COLUMN($A$1:$X$1)-COLUMN($A$1)+1),COLUMNS($Z1:Z1)),"")
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Aryatect,

Yes, it worked. I got the exactly result that I am looking for.

Thanks so much, you saved me a lot of time with this formula. I really appreciate it.

BDT
 
Upvote 0
Eric,

That is awesome! I tested your version and it worked with the exactly result.

Thank you for your help! very much appreciated.

BDT
 
Last edited:
Upvote 0
Glad we could help! :)

This was a fun one. Multiple people working on multiple formulas to get one that works for you.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top