View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Count Unique Values

=SUM(--(FREQUENCY(IF((B2:B20="Wed")*(C2:C20="Morning"),MA TCH(A2:A20,A2:A20,0
)),ROW(INDIRECT("1:"&ROWS(A2:A20))))0))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Dave" wrote in message
...
I'm trying to count the unique values given several conditions, for

example
in the example below, count the number of unique Item_num's that were sold

on
Wed during the Morning, which would return 2:

A B C
1: Item_Num Day Time
2: 1 Wed Morning
3: 1 Wed Morning
4: 2 Thur Evening
5: 2 Thur Evening
6: 3 Thur Morning
7: 3 Thur Morning
8: 4 Wed Evening
9: 4 Fri Evening
10: 5 Wed Morning
11: 5 Wed Morning