IF AND/OR Nesting
Hi there!
I would like to combine all of these values into one "Health" column (four colors). See chart attached. How would they be combined?
Answers
-
To nest multiple AND functions inside of an OR function (grouping the "Blue" outputs for example) you treat the entire AND as if it is a single "logical statement" within the OR function.
=IF(OR(AND(..................), AND(...................)), "Blue")
-
Thank you @Paul Newcome I appreciate you making it simple for me. I was overthinking this. Would this work? I get an unparseable error.
=IF(OR(AND([Account has Updated Renewal Added to TL]@row = 0, [Round #3 Price Sheet Status]@row = “Not Renewing”),AND([Account has Updated Renewal Added to TL]@row = 1, [Round #3 Price Sheet Status]@row = “Billing Approved”), "Blue”, IF([Price Sheet Deadline]@row >= TODAY(20), "Green", IF([Price Sheet Deadline]@row < TODAY(18), "Red", IF([Price Sheet Deadline]@row < TODAY(20), "Yellow")))
-
It looks like there are a couple of issues.
You are missing a closing parenthesis to finish off the OR function. There are also "smart quotes" in your formula. See how some of your quotes are slanted? Those are call "Smart Quotes" which (ironically enough) are not recognized as valid characters by Smartsheet.
See how some of your quotes as well as all of the quotes in this comment are straight up and down? Those are the ones you want. You can get them by typing directly in Smartsheet, here in the Community, or in a text editor such as Notepad (not Word).
Below is the formula with the closing parenthesis and quotes fixed. If this does not work then we can start diving in a little deeper.
=IF(OR(AND([Account has Updated Renewal Added to TL]@row = 0, [Round #3 Price Sheet Status]@row = "Not Renewing"),AND([Account has Updated Renewal Added to TL]@row = 1, [Round #3 Price Sheet Status]@row = "Billing Approved")), "Blue", IF([Price Sheet Deadline]@row >= TODAY(20), "Green", IF([Price Sheet Deadline]@row < TODAY(18), "Red", IF([Price Sheet Deadline]@row < TODAY(20), "Yellow")))
-
That works! Thank you for your help!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.3K Get Help
- 462 Global Discussions
- 156 Industry Talk
- 508 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 81 Community Job Board
- 517 Show & Tell
- 35 Member Spotlight
- 3 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!