Count cells based on date range in another column

T

TFTAJLLYMXZP

Could someone please suggest how to use a worksheet function to count
the number of non-empty cells in one column when the value in another
(date) column is in a particular date range? The first column happens
to be dates as well, but the formula would ideally work regardless of
the counted column's data type.

e.g.

Given data such as:
Column 1 Column 2
--------- --------
23-Oct-03 2-Jan-04
12-Dec-03
1-Jan-05 14-Feb-05
31-Oct-02 12-Dec-03
1-Jan-05 14-Feb-05
31-Oct-02 12-Dec-03

How do I count the non-empty cells in Column 1 when Column 2 contains a
date in the year 2003?

Thanks,

Terry
 
G

Guest

=SUMPRODUCT(--(YEAR(C2:C10)=2003),--(B2:B10<>""))

where C2:C10 is column 2 and B2:B10 column 1

Regards,

Peo Sjoblom
 

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