Looking to find most repeated text in a column on excel depending on criteria - 2 problems

SW82SW

New Member
Joined
Feb 10, 2025
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I am part of a betting syndicate at work where we pick football teams to win their match every weekend. I keep a spreadsheet of the results and want to find the most picked team by each tipper and wondered if it was possible for it to show multiple answers in the same cell if there were multiple teams picked the same amount of times. If there was no team a tipper had picked multiple times then I would like it to show "all unique" or similar. I can get the most picked team but can't get it to show multiple teams or the "all unique" scenario.

I would also like to see the top 3 most successful picks and the 3 least successful picks for the group as a whole but I am not sure how to do this.

For my first problem, the most picked teams by tipster, (using Matthew as the example) I am using the following formula to return the most picked team. I am not sure how to return multiple answers in the same cell or show that all picks are unique:

=INDEX(Bets!$H11:$H108756,MODE(IF(Bets!$E11:$E108756="Matthew",IF(Bets!$H11:$H108756<>"",MATCH(Bets!$H11:$H108756,Bets!$H11:$H108756,{0,0})))))

For my second problem, the most and least successful teams picked by the group as a whole, I have used the following formula to return the most picked winning team and most picked losing team. "Y" is for a winning bet and "N" is for a losing bet:

=INDEX(Bets!$H11:$H108756,MODE(IF(Bets!$P11:$P108756="Y",IF(Bets!$H11:$H108756<>"",MATCH(Bets!$H11:$H108756,Bets!$H11:$H108756,{0,0})))))

=INDEX(Bets!$H11:$H108756,MODE(IF(Bets!$P11:$P108756="N",IF(Bets!$H11:$H108756<>"",MATCH(Bets!$H11:$H108756,Bets!$H11:$H108756,{0,0})))))

For all formulas column E is the tipper name, column H is the teams picked and column P is whether the pick won or not ("Y" or "N").

Thank you
 
I tried to use XL2BB but as I am using a work laptop it wouldn't allow me to use it.
So in future I suggest that you say that in your initial post so we don't keep asking. :cool:
Another option is to make up a small dummy worksheet with any irrelevant columns hidden and just copy/paste that into your post and tell us what columns they are. For example, from my 'Bets' sheet above, here is E10:H15 with columns F&G hidden

NameTeam
Matthewa
Johnd
Annd
Matthewb
Matthewa
 
Upvote 0
So in future I suggest that you say that in your initial post so we don't keep asking. :cool:
Another option is to make up a small dummy worksheet with any irrelevant columns hidden and just copy/paste that into your post and tell us what columns they are. For example, from my 'Bets' sheet above, here is E10:H15 with columns F&G hidden

NameTeam
Matthewa
Johnd
Annd
Matthewb
Matthewa
Sorry Peter, I will bear that in mind in future.

Using your clipped example above I would just like to find the most frequent text in column H, and display this in one cell, whether there is one value or multiple most common values. Obviously, in this instance my result would be "a" and "d".

Thanks again.
 
Upvote 0
Here is an option, Create a GroupBy which is now part of 365 and then bring the data into power pivot and show the data as reflected in the pivot table.

Book9
ABCDEFGHIJKLM
1NameTeam
2MatthewaNameTeamTeamLeaderColumn Labels
3JohndAnnd1Row Labels(blank)1234
4AnndAnne1(blank)
5MatthewbJohna1Annd, e
6MatthewaJohnc3Johna, dc
7JohncJohnd1Matthewba, c, f
8MatthewbMatthewa4
9MatthewcMatthewb2
10JohncMatthewc4
11MatthewfMatthewf4
12Matthewc
13Johna
14Matthewa
15Matthewc
16Matthewa
17Johnc
18Anne
19Matthewf
20Matthewf
21Matthewc
22Matthewf
Sheet1
Cell Formulas
RangeFormula
D2:F11D2=GROUPBY(A1:B22,B1:B22,COUNTA,3,0)
Dynamic array formulas.


The measure in power pivot is =CONCATENATEX('Range','Range'[Team],", ") which is in DAX
 
Upvote 0
Upvote 0
Peter
I did see that. I believe the OP may not realize that GroupBy is now available in 365 which is what they have indicated in their profile. I thought that showing that solution may prompt them to explore Excel a bit. But, I understand where you are coming from. Cheers.
 
Upvote 0
This works perfectly, thanks again.
Cheers. Thanks for the confirmation. (y)

Peter
I did see that. I believe the OP may not realize that GroupBy is now available in 365 which is what they have indicated in their profile.
Fair enough. Does everybody with 365 now have GROUPBY? I thought perhaps not, since the Help for it does not yet appear in this list where Help for all the other generally available functions is provided. (I know that the Help for GROUPBY is available elsewhere)
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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