Unique Count by Month

  • Thread starter Thread starter Cassie
  • Start date Start date
C

Cassie

I needed to count all the unique names by month. Names in Col B and the
months are in col c. the names appear multiple times in the file
at least once in each month - I only want to count John Smith once in January
but his name appears 4 times in January

Thanks
Cassie
 
Try this array formula

=SUM(--(FREQUENCY(IF(C1:C20="Jul",MATCH(B1:B20,B1:B20,0)),ROW(INDIRECT("1:"&ROWS(B1:B20))))>0))
 
Since ROWS(B1:B20) is always 20, why not:
SUM(--(FREQUENCY(IF(C1:C20="Jul",MATCH(B1:B20,B1:B20,0)),ROW(1:20))>0))
 
Bob thanks

I got a #value! error
my data runs from row 1 header; row 2 - 10171 is the actual data
col b are the months
col c are the names

Cassie
 
That would be

=SUM(SIGN(FREQUENCY(IF(C2:C10171="Jul",MATCH(B2:B10171,B2:B10171,0)),ROW(INDIRECT("1:"&ROWS(B2:B10171)-ROW(B2)+1)))))

and make sure that you array-enter it
 
Thanks very much - that works a treat
Cassie

Bob Phillips said:
That would be

=SUM(SIGN(FREQUENCY(IF(C2:C10171="Jul",MATCH(B2:B10171,B2:B10171,0)),ROW(INDIRECT("1:"&ROWS(B2:B10171)-ROW(B2)+1)))))

and make sure that you array-enter it


--

HTH

Bob




.
 
Back
Top