DATE as criteria in SUMIF

  • Thread starter Thread starter Gavin Ramsay
  • Start date Start date
G

Gavin Ramsay

Hi there

I'm doing something really obviously stupid, but since last night I
can't find out what!

I want to sum all transactions that occured before 1st May for each year
2001 - 2004

Cell L7 contains the number 2001
C9:C43 are the transaction dates (formatted as dates)
D9:D43 are the amounts

If my formula says

=SUMIF(C9:C43, < DATE(L7, 5, 1), D9:D43)

I get an error message. Can anyone help? The same date range is already
used to calculate depreciation as part of an IF statement on the same
sheet - it works fine with DATE(L7, 5, 1)>C9 as the IF criteria...

Thanks in hope!

Gavin
 
Frank Kabel said:
Hi
try:
=SUMIF(C9:C43,"<"&DATE(L7, 5, 1), D9:D43)

Perfect!

Thanks, Frank, that's fantastic. I thought it might be something to do
with quotes, but hadn't thought of your solution.

Good luck

Gavin
 
Back
Top