Lookup/Sum Combo Problem

J

Jason

All,
I need a formula that will find all rows within a column that match
specific date criteria (for instance, >=1/5/04 and <1/9/04) and then
sum all the values that are input in a different column for that
corresponding rows. I've tried Sumif, Lookup and If statements but
can't seem to get what I need. Does anyone know how to do this?

Thanks,

Jason.
 
J

Jerry W. Lewis

If the dates are in A1:A10, and the numbers to be summed are in B1:B10,
then you could use
=SUMIF(A1:A10,">="&DATEVALUE("1/5/04"),B1:B10)

Jerry
 
J

Jason

Jerry,
I was able to get the formula to work if there's a single date
criteria (i.e., >=1/5/04) but I wasn't able to get to work if there's
multiple date criteria (i.e. >=1/5/04 & <=1/9/04). Is there something
else that I need to do?

Thank for your help.

Jason
 
J

Jerry W. Lewis

SUMIF cannot handle multiple criteria. For complicated situations, you
would have to use a SUMPRODUCT formula, but your case is simple ... just
subtract off the excess.

=SUMIF(A1:A10,">="&DATEVALUE("1/5/04"),B1:B10)
-SUMIF(A1:A10,">"&DATEVALUE("1/9/04"),B1:B10)

Jerry
 

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