How to find the most frequent combination in a dataset.

winds

Board Regular
Joined
Mar 9, 2022
Messages
70
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Hello. I have a dataset that goes something like this

texttypechangecharactervaluereason
Alfredabad
Bettyacacgs
Charlievvvgd

The letters in the columns do not matter (it's actually numbers, I'm just altering the data for privacy purposes). But basically, I want to know in this data set, which is the most common combination. In this simple example, the highest combination can be taken from type, value and character where they occur three times. Second highest would be reason and change, and the least would be text.

The actual data set is much larger hence the need for some.. method.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Do you count duplicates as 1 or 2? For example b, c, v, v is 4 or 3?
 
Upvote 0
Do you count duplicates as 1 or 2? For example b, c, v, v is 4 or 3?
Duplicates doesn't matter.. they could all be the same values. What's important is the number of occurences in the column and row.
 
Upvote 0
How about this?

Book1
ABCDEFGHIJK
1texttypechangecharactervaluereasonFrequencyHeaders
2Alfredabad3type, character, value
3Bettyacacgs2text, change, reason
4Charlievvvgd
5
6Count232332
7
Sheet9
Cell Formulas
RangeFormula
I2:I3I2=UNIQUE(LARGE($B$6#,SEQUENCE(COLUMNS(B1:G1))))
J2:J3J2=BYROW(IF(I2#=B6#,B1:G1,""),LAMBDA(r,TEXTJOIN(", ",TRUE,r)))
B6:G6B6=BYCOL(B2:G4,LAMBDA(col,COUNTA(col)))
Dynamic array formulas.
 
Upvote 0
How about this?

Book1
ABCDEFGHIJK
1texttypechangecharactervaluereasonFrequencyHeaders
2Alfredabad3type, character, value
3Bettyacacgs2text, change, reason
4Charlievvvgd
5
6Count232332
7
Sheet9
Cell Formulas
RangeFormula
I2:I3I2=UNIQUE(LARGE($B$6#,SEQUENCE(COLUMNS(B1:G1))))
J2:J3J2=BYROW(IF(I2#=B6#,B1:G1,""),LAMBDA(r,TEXTJOIN(", ",TRUE,r)))
B6:G6B6=BYCOL(B2:G4,LAMBDA(col,COUNTA(col)))
Dynamic array formulas.
Your method looks like it works and correct. However I can't seem to apply it my data set. I got the #NAME error for formula in B6. Also the popup that shows problem in formula for cellI2..
 
Upvote 0
Which version of excel are you using 365 or 2019?
 
Upvote 0
Hello. I have a dataset that goes something like this

texttypechangecharactervaluereason
Alfredaaaa
Charliecccccc
Veronicavvvvv

The letters in the columns do not matter (it's actually numbers, I'm just altering the data for privacy purposes). But basically, I want to know in this data set, which is the most common combination. In this simple example, the highest combination can be taken from type, value and character where they occur three times. Second highest would be reason and change, and the least would be text.

The actual data set is much larger hence the need for some.. method.

I have edited for the data for another question. So again we have two cases that have solved where type and characted and value occurs the most.

However is it also possible to find the most occurence regardless of the other data? What I mean here is for example, c and V occurs the most here, 5 times.
 
Upvote 0
With out version 365 dynamic functions. I don't see an easy way to accomplish what you're asking for. Maybe VBA is an option. Not sure I can assist further.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,215
Members
452,618
Latest member
Tam84

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