Error with Multiple "IF" Statements.
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
-
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.
-
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.
-
Oh great. Glad to hear it's working.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 58 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!