determine which cell is the max count

K

Kim

Hello guys, pls. help.

Column A
dog
cat
cat
dog
dog

I would like to know which animal in the column A is max. or is min.
the max. is dog.
the min. is cat.

What is the formula to use?
 
J

JMB

one approach you could try. I assume you do not want empty/blank cells
considered?

=INDEX(A1:A10,MODE(IF(A1:A10<>"",MATCH(A1:A10&"",A1:A10&"",0))))

array entered using Ctrl+Shift+Enter. of course it will only find the first
one in case of a tie.
 
J

JMB

overlooked the second part of your question - finding the one with the fewest
entries. it's a bit longer, but I think this will work

=INDEX(A1:A10,MATCH(SMALL(IF(A1:A10<>"",COUNTIF(A1:A10,A1:A10&"")),1),IF(A1:A10<>"",COUNTIF(A1:A10,A1:A10&"")),0))
 
J

JMB

also array entered with Ctrl+Shift+Enter.

JMB said:
overlooked the second part of your question - finding the one with the fewest
entries. it's a bit longer, but I think this will work

=INDEX(A1:A10,MATCH(SMALL(IF(A1:A10<>"",COUNTIF(A1:A10,A1:A10&"")),1),IF(A1:A10<>"",COUNTIF(A1:A10,A1:A10&"")),0))
 

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

Top