How to SUMIF between two dates?

Hi,

I have a table with a list of expenses ordered by date. In a new table I am trying to have weekly subtotals, but I can not figure out how to SUM the amounts if they fall between two dates? please help

Thanks for looking

macbook pro, Mac OS X (10.6.2)

Posted on Jan 13, 2010 11:40 AM

Reply
7 replies

Jan 13, 2010 12:55 PM in response to anotherKai

kai.taylor wrote:
Have I got the syntax wrong?

=SUMIFS(Transactions::Amount,Date,(Date>=B3)&(Date<=C3))
</div>

Yes. And the function, I think.
The ampersand is a concatenation operator—it joins two values into a text string. You're looking for the AND(testA,testB...) function which makes several tests and returns "TRUE" only if all the tests return "TRUE".

SUMIFS() is used when any of several different conditions, and includes the amount in the SUM if ANY of the conditions is TRUE.

You want SUMIF(). But SUMIF() will also give an error unless you put the condition results into a separate column. It might be easier to do this:

I've put the dates into column E and amounts into column F, rows 3:18 in the example.

The following formula goes in G3, and is filled down to G18

=IF(AND(E>=$B$3,E<=$C$3),F3,0)

Then use this formula where you want to report the SUM

=SUM(G3:G18)

Regards,
Barry

Jan 13, 2010 2:18 PM in response to Barry

Barry wrote:
SUMIFS() is used when any of several different conditions, and includes the amount in the SUM if ANY of the conditions is TRUE.


From the Functions Browser: "If all of the conditions are met, the corresponding cell or value in sum-values is included in the sum.".

SUMIFS will include values where ALL of the conditions are met.

Jan 13, 2010 4:06 PM in response to Badunit

Badunit wrote:
From the Functions Browser: "If all of the conditions are met, the corresponding cell or value in sum-values is included in the sum.".

SUMIFS will include values where ALL of the conditions are met.


Thanks for the correction. Serves me right for replying where I didn't have the time to check the guide. 😟

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to SUMIF between two dates?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.