Sumif on dates

N

Nige Danton

Mac OSX Excel 2003: I am using the sumif function to add some data
based on date criteria. The formula is of the form:

=SUMIF(B2:B20,"<="&DATE(2008,3,30),C2:C20)-SUMIF(B2:B20,"<"&DATE
(2008,3,1),C2:C20)

and it works properly. Instead of hard coding the dates into the
formula I want to have it refer to helper cells where the dates would
be entered. However when I do that I get an error saying I have
entered too few arguments. What's the correct way to do this?

Many thanks
 
M

macropod

Hi Nige,

If your two reference dates are in A2 & A3, respectively, you could use:
=SUMIF(B2:B20,"<="&A2,C2:C20)-SUMIF(B2:B20,"<"&A3,C2:C20)
 
N

Nige Danton

If your two reference dates are in A2 & A3, respectively, you could use:
=SUMIF(B2:B20,"<="&A2,C2:C20)-SUMIF(B2:B20,"<"&A3,C2:C20)

That's perfect - many thanks.
 

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