How do I count items within a date range in Excel?

G

Guest

I am trying to count the number of occurences of a text item within a date
range. I have tried using the COUNTIF function, but since my date is in
DD/MM/YYYY format I am unable to single out the year (ex "2004"). Example,
total number of Safety Classes in 2004 - with one column as the date and
another column listing the safety class. I can count the total number of
occurences of the safety class, I'm just having issues coordinating it with a
date range.
 
P

Peo Sjoblom

=SUMPRODUCT(--(YEAR(A2:A100)=2004),--(B2:B100="Safetyclass1"))

will count year 2004 in A where B is safetyclass1
adapt to fit your requirements
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top