Count
Assuming C1 is your "dropdown" and A2:B25 your table, try this ARRAY FORMULA
(Commit with Ctrl-Shift-Enter):
=COUNT( 1 / ( MATCH( $A$2:$A$25, IF( $B$2:$B$25 = $C$1, $A$2:$A$25, #N/A ),
0 ) = ( ROW( $A$2:$A$25 ) - ROW( $A$2 ) + 1 ) ) )
Adjust to your ranges...
--
Regards,
Luc.
"Festina Lente"
"Mark O" wrote:
Looking for a formula where, using the data below, if I pick a city, such as
PHOENIX, it will count the number of unique vendors that city has. So this
example would give me the value of 4 (unique vendors A, B, C, and D).
Vendor City
A PHOENIX
B PHOENIX
B PHOENIX
C PHOENIX
C PHOENIX
D PHOENIX
A LA
C CHICAGO
|