0
votes

I'm using the following formula in Excel to count the unique values within a column.

=SUMPRODUCT(--(FREQUENCY(MATCH(B3:B12,B3:B12,0),ROW(B3:B12)-ROW(B3)+1)>0))

I want to expand on that slightly and count the unique values from column B that match column J's value of "United Kingdom".

How can I do that?

1

1 Answers

1
votes
=SUM(--(FREQUENCY(IF(J3:J13="United Kingdom",MATCH(B3:B13,B3:B13,0)),ROW(B3:B13)-ROW(B3)+1)>0))

Confirm through CtrlShiftEnter