andydtaylor
Active Member
- Joined
- Feb 15, 2007
- Messages
- 360
- Office Version
- 2016
Hi,
My brain's clearly not fired up today because I'm stuck on the following!
If anyone can help I'd be very grateful.
I'd like to count the most frequently occuring value in a cell. That's it basically.
Say you have the following (actual extract) in a single cell
17,18,58,59,18,59,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,16,18,23,49,54,59,62,18,59
What formula can I use to show that the most commonly occuring value appearing is 18? [Possible values are 10 through to 99].
The source data for this is in fact a single row accross 5 columns and I concatenated it thinking that made things easier.
The original:
B11: 17,18,58,59
C11: 18,59
D11: 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50
E11: 16,18,23,49,54,59,62
F11: 18,59
Ideally the formula should take this (B11:F11) range as it's input (I can then spill it down 50-odd rows)
ps I have tried the following
=INDEX(B11:F11,MATCH(MAX(COUNTIF(B11:F11,B11:F11)),COUNTIF(B11:F11,B11:F11),0))
Unfortunately though the internet tells me this should work, the result I get back is 18,59 which is wrong because:
18 occurs 5 times
59 occurs only 4 times
Any insight you can give me is much appreciated,
Andrew
My brain's clearly not fired up today because I'm stuck on the following!
If anyone can help I'd be very grateful.
I'd like to count the most frequently occuring value in a cell. That's it basically.
Say you have the following (actual extract) in a single cell
17,18,58,59,18,59,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,16,18,23,49,54,59,62,18,59
What formula can I use to show that the most commonly occuring value appearing is 18? [Possible values are 10 through to 99].
The source data for this is in fact a single row accross 5 columns and I concatenated it thinking that made things easier.
The original:
B11: 17,18,58,59
C11: 18,59
D11: 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50
E11: 16,18,23,49,54,59,62
F11: 18,59
Ideally the formula should take this (B11:F11) range as it's input (I can then spill it down 50-odd rows)
ps I have tried the following
=INDEX(B11:F11,MATCH(MAX(COUNTIF(B11:F11,B11:F11)),COUNTIF(B11:F11,B11:F11),0))
Unfortunately though the internet tells me this should work, the result I get back is 18,59 which is wrong because:
18 occurs 5 times
59 occurs only 4 times
Any insight you can give me is much appreciated,
Andrew