Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Date Field Comparison in SUMIFS Formula

Status
Not open for further replies.

bhujanga

Programmer
Oct 18, 2007
181
US
I'm trying to sum the values in a range, where the corresponding date is less than the date in another cell.
The cell with the key date in it is E5 on what we will for simplicity's sake call Sheet-A
The reference table we will say is on Sheet-B in cells A1:B50.
So let's say I want to sum the values in Column B if the date in column A is <= the date in Sheet-A Cell E5
So I have:
=SUMIFS('Sheet-B'!$B1$B50,...some other conditions that work fine...,'Sheet-B'!$A$1:$A$50,"<=" & 'Sheet-A'!E5)
It does not like this. What must I do?
Thank you.
 
Currently the date 9/1/14, but it could be any date.
 
If you select that cell and change the Number Format to GENERAL, what happens?
 
Changing it to general resulted in the date reverting back to its inherent integer value. However, since you got me looking at the formats, I noticed that when I had set the date format, it was actually considering it of the type 'Custom'. Upon changing that to 'Date' the formula began working.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top