MrExcel Publishing
Your One Stop for Excel Tips & Solutions

SUMIF a cell has a date during a specified time


Posted by Mike on October 02, 2001 1:29 PM

I have the following Data

A B C D
1 08/02/01 $100 08/01/01
2 09/02/01 $200 08/30/01
3 09/15/01 $300

I want cell A5 to sum the amounts in column B that lie between the dates in D1 and D2. The result would be $100 because that is the only date that falls between the input dates in column D. Does anyone know how to structure a formula to do this? Thanks


Posted by Mike on October 02, 2001 1:31 PM

Column A has dhte dates, B has the dollar values and D has the input dates


Posted by Aladin Akyurek on October 02, 2001 1:32 PM

Try:

=SUMPRODUCT((A1:A3>=D1)*(A1:A3<=D2)*(B1:B3))

This formula uses an inclusive between. Modify that if needed.

Aladin

Posted by Aladin Akyurek on October 02, 2001 1:33 PM

See above. (NT)


Posted by Mike on October 02, 2001 1:42 PM

That worked, Thanks