Reputation: 11
I was trying to use the =SUMIF
function to calculate the expected expenses to date. In other words, only values in the Amount
column should be added to the total if the respective value in the Date
column is less than the value labelled Today's Date
.
Upvotes: 1
Views: 1636
Reputation: 1099
The following formula should produce the result you desire:
=SUMIF(D5:D13,"<="&D2,F5:F13)
The issue was that you did not have an ampersand between "<="
and D2
. The second argument of a =SUMIF
must be a string, but Google Sheets does not know to interpret the value in D2
as a string by default. Thus, you get a formula parse error. By concatenating D2
with <=
as a string, the =SUMIF
's second argument will now be a single string and the formula will function correctly.
Functions used:
Upvotes: 1