Nested If Statement with If/And in it
I'm having trouble adding If/And to a nested IF statement. Hoping someone might be able to spot where I'm going wrong. What I'm trying to do is automate a red, yellow, green, blue column. The last criteria combine criteria in two separate fields. Thank you!
=IF([Approval Status]1 = "Denied", "Red", IF([Approval Status]1 = "Pending", "Yellow", IF([Approval Status]1 = "Approved", "Blue"), IF(AND([Mardee Approval]1 = "Approved", [Approval Status]1 = "Approved") "Green", " ")))))
Comments
-
You are missing a comma between the end of the AND statement and "Green", and you have an extra parenthesis tacked on to the end.
-
You also have an extra parenthesis after "Blue".
-
Thank you Paul. I tried that, and it did remove the error code. However, I'm still off somewhere because the ball still turns blue instead of green when the IF/AND conditions are triggered. The ball should be blue only if "approval status" says approved, and turn green with both "approval status" and "mardee approval" say approved. Here is a link: https://publish.smartsheet.com/214f72664303441e9b2b53277af858b8
Is it an order of operations issue, maybe?
Thanks for your help.
-
It is an order of operations issue, because the approval status will always be approved in the case of the blue, it will never fail and fire the green. Move the IF(AND statement before the blue one and you should be good to go. If both of the conditions fail for green, it will move on to check for the blue.
-
Yes. It would be an ordering issue. Once the formula finds a true value, it stops running. Try putting the Blue IF at the end or moving your AND IF to the beginning.
-
Beat me by a minute... Lol
-
This is not a race! It's a community!
-
That did it! Thank you!
-
Haha. I know. I just get a kick out of it when multiple people post the same thing at pretty much the same time. Hahaha
-
-
Glad we could be of service!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!