Count values in rows depending on dates.

Q

Qaspec

In cell A1:A20 I have dates and in cell B1:B20 I have categories (ex a, b,
c). I'd like to count the number of times A is present within the last 6
months from todays date. I'd also like to count the total number of actual
entries in range B1:B20.

Thanks for any help.
 
P

Peo Sjoblom

=SUMPRODUCT(--(A1:A20>DATE(YEAR(TODAY()),MONTH(TODAY())-6,DAY(TODAY()))),--(B1:B20="a"))


=COUNTA(B1:B20)


Regards,

Peo Sjoblom
 
Top