Question : Trouble Counting Unique Values

I need a formula to count the number of Unique Values in Column B that exist when the value in Column A equals the value from Column K, see attachment for easier understanding.  I will be putting the formula into column L next to the values in Column K.

I am using excel 2007

thanks

-brandon
Attachments:
 
See Attached file
 

Answer : Trouble Counting Unique Values

You can use this "array formula" in L2

=SUM(IF(FREQUENCY(IF(A$2:A$6000=K2,IF(B$2:B$6000<>"",MATCH(B$2:B$6000,B$2:B$6000,0))),ROW(B$2:B$6000)-ROW(B$2)),1))

confirmed with CTRL+SHIFT+ENTER so that curly braces like { and } appear around the formula in the formula bar.....and copied down the column......it's a "resource hungry" formula so may take a few minutes for all rows to calculate.

regards, barry

Random Solutions  
 
programming4us programming4us