SumIf with date range

J

juliejg1

I have a formula:

=SUMIF(Details!AE$1:BQ$1,">=CurDate",Details!AE2:BQ2)

AE1:BQ1 on the Details page are dates
CurDate is the current date and is a named cell
AE2:BQ2 on the Details page are values

I need the formula to look at the date range AE1:BQ1 and determine if it's
value is greater than or equal to the value of the CurDate. If it is then
sum the fields in AE2:BQ2.

The formula I have presented above does not work.....any suggestions?
 
J

juliejg1

Works Great...thank you!!! One question...why do I need the quotes around
the >= instead of around the entire calculation? I'd like to understand why
it works now and not before. Thanks again.
 
T

T. Valko

That's just one of Excel's quirks!

If the criteria is a hardcoded number:

=SUMIF(range1,">=10",range2)
=SUMIF(range1,100,range2)

If the criteria is hardcoded text:

=SUMIF(range1,"X",range2)

If the criteria is a cell reference or a named cell:

=SUMIF(range1,">="&A1,range2)
=SUMIF(range1,">="&CurDate,range2)
=SUMIF(range1,CurDate,range2)
=SUMIF(range1,A1,range2)
 
J

juliejg1

Thank you



T. Valko said:
That's just one of Excel's quirks!

If the criteria is a hardcoded number:

=SUMIF(range1,">=10",range2)
=SUMIF(range1,100,range2)

If the criteria is hardcoded text:

=SUMIF(range1,"X",range2)

If the criteria is a cell reference or a named cell:

=SUMIF(range1,">="&A1,range2)
=SUMIF(range1,">="&CurDate,range2)
=SUMIF(range1,CurDate,range2)
=SUMIF(range1,A1,range2)
 

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