condition sumif commands based on date range?

J

joek8724

How do I structure sumif commands based on a range of dates in an adjacent
column?
 
T

T. Valko

One way...

For all versions of Excel.

A1:A20 = dates
B1:B20 = values to sum

The best way to do this is to use 2 cells to hold the date boundaries.

D1 = start date = 1/25/2008
E1 = end date = 3/17/2008

Sum is inclusive of start and end dates.

=SUMIF(A1:A20,">="&D1,B1:B20)-SUMIF(A1:A20,">"&E1,B1:B20)

Or, you can hard code the dates:

=SUMIF(A1:A20,">="&DATE(2008,1,25),B1:B20)-SUMIF(A1:A20,">"&DATE(2008,3,17),B1:B20)

For Excel 2007.

=SUMIFS(B1:B20,A1:A20,">="&D1,A1:A20,"<="&E1)

=SUMIFS(B1:B20,A1:A20,">="&DATE(2008,1,25),A1:A20,"<="&DATE(2008,3,17))
 

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

Similar Threads

Help needed 0
Sumif function with a date range condition statement 4
SumIf by Date? 12
Sumif formula 4
SUMIF by Week. 8
SUMIF and Named ranges 6
sumif with 2 variables 2
Sumif comparing dates in criteria 1

Top