DATE as criteria in SUMIF

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
 
G

Gavin Ramsay

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
 

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