If statement with sumifs not working  yet each element does
Hello, I have what I consider a basic formula that is not working:
=IF({Finish} = "", SUMIFS({MPST Savings}, {Location}, =Label@row, {Target Finish}, AND(>DATES3, <=DATES4)), SUMIFS({MPST Savings}, {Location}, =Label@row, {Finish}, AND(>DATES3, <=DATES4)))
Yet, if I enter the true portion it works:
=SUMIFS({MPST Savings}, {Location}, =Label@row, {Target Finish}, AND(>DATES3, <=DATES4))
and if I enter the false portion, it works:
=SUMIFS({MPST Savings}, {Location}, =Label@row, {Finish}, AND(>DATES3, <=DATES4))
Yet when I put it all together it gives me #INVALID OPERATION.
I am scratching my head as to the simple thing I'm missing…
Thanks
Silvano
Answers

Hi @Silvano Meffe,
The issue is with the "IF" portion of your formula. You cannot evaluate an IF against a range, which is what you are doing in the formula. If you need to use that as the initial criteria, the formula needs to be on that sheet and looked at rowbyrow.
Hope this helps,
Dave

So maybe for two reasons
 You should have an @row after the {Finish} in the intial logical statement
 You could try and use ISBLANK({Finish}@row) as well as the intial logical statement
Let me know if either of these worked!
Thanks!
Nick Stafford

for further clarification {Finish} references a date column and the IF statement is just checking if it is blank.

Sadly when I added @row, either using the formula or ISBLANK, I now get #UNPARSEABLE.
Also, I would think that given all other references to other sheets are column references, without the @row so as to do the sumifs with columns, the {Finish} also should be a column reference.
Help Article Resources
Categories
Check out the Formula Handbook template!