If statement with sumifs not working - yet each element does

Options

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

  • DKazatsky2
    DKazatsky2 ✭✭✭✭✭✭
    Options

    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 row-by-row.

    Hope this helps,

    Dave

  • NickStaffordPM
    NickStaffordPM ✭✭✭✭✭
    Options

    So maybe for two reasons

    1. You should have an @row after the {Finish} in the intial logical statement
    2. 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

  • Silvano Meffe
    Options

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

  • Silvano Meffe
    Options

    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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!