Criteria in SUMIF

S

Space Elf

I'm trying to use SUMIF to total a range of numbers. I'd like to get the
results for a particular month but I can't figure out how to use a date range
under criteria. It only seems to let me choose greater than or less than one
date.

Is there a way to use an equivalent criterea argument like >4/30/2005 &
<6/1/2005
in order to add all values in a column when the corresponding date column is
in the month of May 2005?
 
B

bpeltzer

To use a range of values you can either use sumproduct or use two sumif
calculations. My preference is for the latter:
=sumif(a:a,">=" & date(2005,5,1), b:b) - sumif(a:a,">=" & date(2005,6,1),
b:b).
The first part adds up everything from May 1 and later; the second takes
out everything from June 1 and later, leaving only May activity.
--Bruce
 
R

Ron Coderre

Try something like this
=SUMPRODUCT(--(A1:A100<DATEVALUE("6/1/2005"))*(A1:A100>=DATEVALUE("5/1/2005"))*(B1:B100))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro
 
Top