SumIf conditional to date range

I

IlliniDan

I have the following data set:

A B
1 10/7/2008
2
3 10/1/2008 92
4 10/8/2008 59
5 10/17/2008 31
6 10/22/2008 42
7 10/29/2008 28
8
9 Total = 92

Where A1 is the current date, I want to sum the total of column B for all
cells where column B corresponds to a date less than cell A1. This total
will be displayed in cell B9.

I'm aware of the SUMIF function, but haven't been able to figure out how to
sum cells based on date without manually changing the formula. Ideally, for
example, if today's date is October 7th, then the formula in cell A1 is
=Today(), and the formula in cell B9 is =SUMIF(A3:B7,"<A1",B3:B7). However,
SUMIF doesn't work that way. Is there an alternative.
Please help!

Thanks in advance!
 
D

Dave Peterson

=sumif(a3:a7,"<"&a1,b3:b7)
or even
=sumif(a3:a7,"<"&today(),b3:b7)
(to avoid putting the formula in A1)
 
T

Teethless mama

You don't need the parens around the B3:B7

here is a simplify version:

=SUMPRODUCT(--(A3:A7<A1),B3:B7)
 
I

IlliniDan

Thanks to everyone who responded so quickly, much appreciated! Both the
Sumproduct and SumIf solutions worked.
 

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

SUMIF / SUMPRODUCT 1
SUMIF with criteria "<>" & "=" 4
Count within a date range 3
simple countif formula 2
Conditional sum equals 0 4
Sumif date range 5
Complex Sales Evaluation 1
Conditional count if question 4

Top