Monday, December 12, 2011

Excel Question: Referencing a date in SUMIF statement?

I'm trying to sum expenses between two dates. Ex. Sept.1/08 and Sept.31/08. I have the start and end date in two different cells:"A1 and A2. This is what I was trying to do, but it doesn't seem to be working.





=SUMIFS(G:G,D:D,"%26gt;=A1",D:D,"%26lt;=A2")





I know I could use the numeric value of the dates, ex. "39760" but I don't want to manually enter them every month. I want to be able to reference them in another cell. Any help would be much appreciated, thanks.|||i am not sure why the wizard does that


you would think it would be more logical





=SUMIFS(G:G,D:D,"%26gt;="%26amp;A1,D:D,"%26lt;="%26amp;A2)





wizard puts the quotes around stuff like "%26lt;=A1"


but it should concatenate them together "%26lt;="%26amp;A1





just in case it comes up...


sumifs() is an excel 2007 only formula. if you want to make it backward compatible with excel 2003, then you have to use sumproduct(). you would have to use something like this.





=SUMPRODUCT((D1:D99%26gt;=A1)* (D1:D99%26lt;=A2)*(G1:G99))

No comments:

Post a Comment