Return the most used title

hnt007

Board Regular
Joined
Dec 18, 2021
Messages
98
Office Version
  1. 365
Platform
  1. MacOS
Hi and thanks for your help!

I have a column with track titles and I'm trying to find a formula that will return the most used track title and that would also let me know how many times it was used, like This Is a Cool Title (5)

=INDEX(A2:A1000,MODE(MATCH(A2:A1000,A2:A1000,0))) with Ctrl Shift Enter doesn't work, I get a #N/A error
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
i have had a play with my answer to your other question
and sorted the unique list and count , by order , so the most frequent title is at the top
in the last example you had 2 titles which had 2 occurrences

this uses a let function, and i found using a google search


Book1
ABCD
1 Track TitlesTitleCount
2 Cool Cool2
3 Here We Go That Title2
4 That Title Here We Go1
5 Cool Nice1
6 Nice 
7 That Title 
8
9
10
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=IF(LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1))=0,"",LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1)))
D2:D7D2=IF(C2="","",COUNTIF($A$2:$A$19,C2))
Dynamic array formulas.


the explanation of the Let function is here

excel 365 automatically adds an Array , so does not need to have Ctrl Shift Enter used
 
Upvote 0
Solution
This is perfect and genius! Exactly what I needed!! Thanks!!
 
Upvote 0
i have had a play with my answer to your other question
and sorted the unique list and count , by order , so the most frequent title is at the top
in the last example you had 2 titles which had 2 occurrences

this uses a let function, and i found using a google search


Book1
ABCD
1 Track TitlesTitleCount
2 Cool Cool2
3 Here We Go That Title2
4 That Title Here We Go1
5 Cool Nice1
6 Nice 
7 That Title 
8
9
10
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=IF(LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1))=0,"",LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1)))
D2:D7D2=IF(C2="","",COUNTIF($A$2:$A$19,C2))
Dynamic array formulas.


the explanation of the Let function is here

excel 365 automatically adds an Array , so does not need to have Ctrl Shift Enter used
This is perfect! Thanks!
 
Upvote 0
you are welcome
As i mentioned, I have seen the new LET() function used in replies here, but not yet learnt how to use it, I was waiting for a requirement , now i have yours i will also goto the website and see how it works for this solution.

NOTE it will only work in 365 versions as far as i know, so if you share the info with people who have older versions of Excel, it will not work

interesting ,
=SORTBY(UNIQUE(A2:A14), COUNTIF(A2:A14,UNIQUE(A2:A14)),-1)
will work, as mentioned in the article

and the Let is very simple to make a shorter formula
I also think it improves performance

Book1
ABCDEFG
1 Track TitlesTitleCountFormulaLet
2 Cool Cool3 Cool Cool
3 Here We Go That Title2 That Title That Title
4 That Title Here We Go1 Here We Go Here We Go
5 Cool Nice1 Nice Nice
6 Nice 00
7 That Title 
8 Cool 
9
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=IF(LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1))=0,"",LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1)))
F2:F6F2=SORTBY(UNIQUE(A2:A14), COUNTIF(A2:A14,UNIQUE(A2:A14)),-1)
G2:G6G2=LET(x,A2:A14,y,UNIQUE(x),SORTBY(y,COUNTIF(x,y),-1))
D2:D8D2=IF(C2="","",COUNTIF($A$2:$A$19,C2))
Dynamic array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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