Error with Multiple "IF" Statements.

Options

Hi All, please could somebody help me with a "IF" / "OR" statement with two arguments, each argument with two conditions. Only one argument needs to be true to return a "1" or "Flag". Whenever I try include "OR" two separate the arguments, I get "Incorrect argument". At the moment, when one argument is true, the row "Un-Flags".


Current formula

=IF([Claim Submission Status]@row <> "Submitted", IF(TODAY() - [Date Claim Received]@row > 14, IF(TODAY() - [Repair Due Date (Rec + 2 days)]@row > 0, IF([Repair Status]@row = "Not Started", 1))))


Argument 1

IF([Claim Submission Status]@row <> "Submitted", IF(TODAY() - [Date Claim Received]@row > 14

Or

Argument 2

IF(TODAY() - [Repair Due Date (Rec + 2 days)]@row > 0, IF([Repair Status]@row = "Not Started"


Please could someone offer the correct formula to achieve this?

Answers

  • David Tutwiler
    David Tutwiler Overachievers Alumni
    Options

    I don't know that I have enough information to solve this correctly, but as far as I can tell this is what you're looking to do:

    =IF(OR(AND([Claim Submission Status]@row <> "Submitted", TODAY() - [Date Claim Received]@row > 14), AND(TODAY() - [Repair Due Date (Rec + 2 days)]@row > 0, [Repair Status]@row = "Not Started")), 1, 0)

    This says if either of the statements with two arguments returns true, return a 1 else return a 0. Each of the statements is AND-ed so that both arguments must be true for it to return true. If this was not the intent, you can change them to ORs so that only one of the arguments has to return true. At that point, you could just make 1 big OR statement and put all 4 arguments in the same OR statement if only one needs to be true.

  • Janiece Denissen
    Options

    Hi @David Tutwiler,


    Sorry for the late reply, I didn't see the response. Thank you for the formula, very much appreciated. That is what I was trying to get working. Was having problems including AND and OR together.

  • David Tutwiler
    David Tutwiler Overachievers Alumni
    Options

    Oh great. Glad to hear it's working.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!