How do I "Sumif" a range for values before today (Now() or Today())

I have a worksheet with creditor amounts in a column and a date due column. I want to be able to Sum the 'creditor amounts' due for payment, i.e. those that are now due to be paid.


How do I "Sumif" a range for values before today (Now() or Today()).


The function is "SUMIF(test-values, condition, sum-values)". I have put the date range in 'test-values', I have put the creditor amounts in the 'sum-values', I have tried every variation I can think of for the 'condition'? It works if I enter a hard date, i.e. <12/12/2017! But, what I want to do is make the condition any date before today, i.e. <NOW() but it doesn't seem to work. Any help appreciated.

IMAC (RETINA 5K, 27-INCH, LATE 2015), macOS 10.13.2

Posted on Dec 21, 2017 4:54 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 24, 2017 3:40 AM

assuming the dates are in column A and the amount to sum is in column B, you can do something like this:

User uploaded file


make the first two rows header rows.

B1=SUMIF(A, "<="&TODAY(), B)


this is shorthand for... select cell B1, then type (or copy and paste from here) the formula:

=SUMIF(A, "<="&TODAY(), B)

9 replies

Dec 21, 2017 12:40 PM in response to BLazare

Hi B'


You were almost there, but missed this important detail (which is not explicitly stated—making it an easy miss) in the examples for SUMIF in the Formula Browser:


=SUMIF(A1:A5, <5”,

=SUMIF(A1:A5, <5”,…

=SUMIF(D1:E3, =c, …


The condition must be expressed/presented as text. In the first three examples, this is accomplished by enclosing the comparison operator (<) and the number (5) or the comparison operator (=) and the letter (c) in quotes.

In Wayne's formula (which solves your question)

B1=SUMIF(A, "<="&TODAY(), B)

the TODAY() function can't e inside the quotes, because Numbers would then not recognize it as a function.

Placed outside the quotes, TODAY() returns the current date (and time, set to 00:00:00) value, and that value is joined to "<=" by the concatenation operator (&) to form a text expression readable by SUMIF.

Regards,

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 do I "Sumif" a range for values before today (Now() or Today())

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