A | G | |
---|---|---|
1 | Name | |
2 | a | |
3 | a | |
4 | b | |
5 | b | |
6 | b | |
7 | c | |
8 | c | |
9 | d | |
10 | d | |
11 | d | |
12 | d | |
13 | x | |
14 | ||
15 | Top 2 | |
16 | d | |
17 | b | |
18 | a | |
19 | c | |
20 | x | |
21 |
Array Formulas
<tbody> </tbody> Note: Do not try and enter the {} manually yourself |
G15 has the value Top 2
G16 has the formula
=IFERROR(INDEX($A$2:$A$20,MODE(IFERROR(MATCH($A$2:$A$20,$A$2:$A$20,0)*{1,1}/(COUNTIF($G$15:$G15,$A$2:$A$20)=0),""))),"") with {} around it
this row return the letter d which is correct
Dragging down or double clicking the next formula looks like this
=IFERROR(INDEX($A$2:$A$20,MODE(IFERROR(MATCH($A$2:$A$20,$A$2:$A$20,0)*{1,1}/(COUNTIF($G$15:$G15,$A$2:$A$20)=0),""))),"") with {} around it as well
this row returns the letter d as well - should be a b.
inserting formula
=COUNTIF($A$2:$A$20,G16) into H16 gives me the count of whats found in G16.
Thanks