MODE formula for finding the most frequent text string

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
Office Version
  1. 365
Platform
  1. MacOS
Hi,

Re my screenshot (below). Is there a way to find the most occurring string of text in a column, please? I have done some research and thought the below MODE formula would do it, but it just gives a blank result:

Screenshot 2021-12-15 at 12.37.19.png


=INDEX('All Completed VS'!E4:E2003,MODE(MATCH('All Completed VS'!E4:E2003,'All Completed VS'!E4:E2003,0)))

The result should 'Marshal', as that has the most (3) entries. Also, can something be added in to state 'Multiple', if there are multiple roles with the same highest amount.

Thanks in advance!

Olly.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about
Excel Formula:
=LET(u,UNIQUE(FILTER(E4:E2003,E4:E2003<>"")),c,COUNTIFS(E4:E2003,u),IF(MAX(c)=LARGE(c,2),"duplicates",INDEX(SORT(CHOOSE({1,2},u,c),2,-1),1,1)))
 
Upvote 0
Solution
How about
Excel Formula:
=LET(u,UNIQUE(FILTER(E4:E2003,E4:E2003<>"")),c,COUNTIFS(E4:E2003,u),IF(MAX(c)=LARGE(c,2),"duplicates",INDEX(SORT(CHOOSE({1,2},u,c),2,-1),1,1)))
Thanks. That worked perfectly. As brilliant as ever! (y)
 
Upvote 0
Hi,

Re my screenshot (below). Is there a way to find the most occurring string of text in a column, please? I have done some research and thought the below MODE formula would do it, but it just gives a blank result:

View attachment 53404

=INDEX('All Completed VS'!E4:E2003,MODE(MATCH('All Completed VS'!E4:E2003,'All Completed VS'!E4:E2003,0)))

The result should 'Marshal', as that has the most (3) entries. Also, can something be added in to state 'Multiple', if there are multiple roles with the same highest amount.

Thanks in advance!

Olly.
You can also use with your method

C2=INDEX($E$4:$E$9,MODE(MATCH($E$4:$E$9,$E$4:$E$9,0)))


Marshal - Use your formula here
Data
Marshal
Marshal
Good
Marshal
Marshal
Good
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,521
Members
449,088
Latest member
RandomExceller01

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