M
maluli
I have a range of unit types and I want to count each unit type and return
the one that occurs most often.
the one that occurs most often.
....One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):
=INDEX(rng,MATCH(MAX(COUNTIF(rng,rng)),COUNTIF(rng,rng),0))
Harlan Grove said:Somewhat shorter and more efficient is Leo Heuser's approach,
=INDEX(rng,MODE(MATCH(rng,rng,0)))
....Bob Phillips said:JE's formula does have one, significant IMO, advantage over that one,
in that it works if there are empty cells in the range, the second
errors out.
....I thought that when I tried it, and I tried it, but it didn't seem to work
then. I wondered if it was down to MODE, but thought I would post and you
might know the solution. Darn thing works now though, must have done it
wrongly.