MODE function for text entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to find the most common entry in a column where the values are text.
MODE only works on numeric values.
 
With a list in A1:A20

Try something like this (in segments for readability):
B1:
=INDEX(A1:A20,
MATCH(MAX(INDEX(COUNTIF(A1:A20,A1:A20),0)),
INDEX(COUNTIF(A1:A20,A1:A20),0),0))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
say the data is in column B.

In A1 enter:
=COUNTIF($B$1:$B$16,B1)
and copy down

In another cell enter:
=VLOOKUP(MAX(A1:A16),A1:B16,2)
This is like MODE because it is the most frequent. For example:

1 bird
8 dog
4 cat
2 mouse
4 cat
4 cat
8 dog
8 dog
1 rate
8 dog
2 mouse
8 dog
8 dog
8 dog
8 dog
4 cat

and the formula returns:
dog
 
Assuming that A2:A100 contains the data, try the following formula that
needs to be confirmed with CONTROL+SHIFT+ENTER...

=INDEX(A2:A100,MODE(IF(A2:A100<>"",MATCH(A2:A100,A2:A100,0))))

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top