@ proficient
This refers to the formula which is forwarded in post
#26 .
The bit:
FREQUENCY(IF($A$2:$A$14=$D2,
IF($B$2:$B$14<>"",MATCH($B$2:$B$14,$B$2:$B$14,0))),
ROW($B$2:$B$14)-ROW($B$2)+1)
of the formula creates maps the occurrences of the non-blank cells in B2:B14 to the bin-array ROW(B2:B14)-ROW(B2)+1, which correspond to the occurrences of D2 in A2:A14.
A. $B$2:$B$14<>"" means: skip blanks/empty cells.
B. MATCH(
$B$2:$B$14,
$B$2:$B$14,0) matches the range interest against itself, leading to
numbers showing matches.
C. FREQUENCY works with numbers (data_array) whose occurrences it classifies into bins_array.
_____________________________
Intermezzo:
[TABLE="class: grid, width: 861"]
<tbody>[TR]
[TD]item[/TD]
[TD]match item set against itself (data_array)[/TD]
[TD]bins_array[/TD]
[TD]count of B[/TD]
[TD]results of count B[/TD]
[/TR]
[TR]
[TD]JAD[/TD]
[TD="align: right"]
1[/TD]
[TD="align: right"]1[/TD]
[TD]from 0 to >= 1[/TD]
[TD]2 = 2 times
1[/TD]
[/TR]
[TR]
[TD]VAD[/TD]
[TD="align: right"]
2[/TD]
[TD="align: right"]2[/TD]
[TD]from 2 to >= 2[/TD]
[TD]1 = 1 times
2[/TD]
[/TR]
[TR]
[TD]JAD[/TD]
[TD="align: right"]
1[/TD]
[TD="align: right"]3[/TD]
[TD]from 3 to >= 3[/TD]
[TD]0 = 0 times
3[/TD]
[/TR]
[TR]
[TD]KAD[/TD]
[TD="align: right"]
4[/TD]
[TD="align: right"]4[/TD]
[TD]from 4 to >= 4[/TD]
[TD]1 = 1 times
4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]rest[/TD]
[TD]0 = 0 times anything beyond 4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]How many results are above 0?[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]This count is precisely the number of unique items JAD, VAD, and KAD.[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
_____________________________
D. The IF bit, i.e.
IF(FREQUENCY(IF($A$2:$A$14=$D2,
IF($B$2:$B$14<>"",MATCH($B$2:$B$14,$B$2:$B$14,0))),
ROW($B$2:$B$14)-ROW($B$2)+1),ROW($B$2:$B$14)-ROW($B$2)+1)
>>
IF(non-zero results of frequency, ROW($B$2:$B$14)-ROW($B$2)+1)
of the formula returns the rows of non-zero results.
E. Feeding the rows from [D] to INDEX looking at $B$2:$B$14 one by one by means of SMALL, we get the list of unique items from
$B$2:$B$14.
See for more:
https://www.mrexcel.com/forum/excel...ing-sum-if-frequency-match-2.html#post3156949
Hope this helps.