Count cells based on date range in another column

  • Thread starter Thread starter TFTAJLLYMXZP
  • Start date Start date
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
 
=SUMPRODUCT(--(YEAR(C2:C10)=2003),--(B2:B10<>""))

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

Regards,

Peo Sjoblom
 
Back
Top