Help with IF AND formula
I appreciate the wealth of knowledge in this community. I have reviewed several scenarios around my similar formula, but still nothing is working. I continue to get #UNPARSEABLE. Hoping some expert out there can help!!
The following formulas work independently, but I need them to work together and drive the RGYG buttons for health.
=IF([Percent of Completion]@row = 1, "Green")
=IF(AND([Percent of Completion]@row < 1, [Due Date]@row < TODAY()), "Red")
=IF(AND([Percent of Completion]@row < 1, [Due Date]@row < TODAY(30)), "Yellow")
=IF([Percent of Completion]@row = 0, "Gray")
Combined I have tried several ways, but this was the best I could come up with:
=IF(([Percent of Completion]@row = 0, "Gray"), IF([Percent of Completion]@row = 1, "Green"), IF(AND([Percent of Completion]@row < 1, [Due Date]@row < TODAY()), "Red"), IF(AND([Percent of Completion]@row < 1, [Due Date]@row < TODAY(30)), "Yellow"))
Thanks in advance, Lindsey Jones
Comments
-
Hi Lindsey,
Try something like this.
The error was that you were closing each IF section.
=IF([Percent of Completion]@row = 0; "Gray"; IF([Percent of Completion]@row = 1; "Green"; IF(AND([Percent of Completion]@row < 1; [Due Date]@row < TODAY()); "Red"; IF(AND([Percent of Completion]@row < 1; [Due Date]@row < TODAY(30)); "Yellow"))))
The same version but with the below changes for your and others convenience.
=IF([Percent of Completion]@row = 0, "Gray", IF([Percent of Completion]@row = 1, "Green", IF(AND([Percent of Completion]@row < 1, [Due Date]@row < TODAY()), "Red", IF(AND([Percent of Completion]@row < 1, [Due Date]@row < TODAY(30)), "Yellow"))))
Depending on your country you’ll need to exchange the comma to a period and the semi-colon to a comma.
Did it work?
Have a fantastic week!
Best,
Andrée Starå
Workflow Consultant @ Get Done Consulting
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Yes, it looks like it did! I am going to play around with it and test some more, but so far so good.
THANK YOU!!!!!
-
Excellent!
Happy to help!
Best,
Andrée
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Hi Andree,
Would you know how to take this a step further? Now, I would like to indicate a general status. Looking for a single formula to return either Green, Red or Yellow based on the following:
Green if all elements (rows) are green
Yellow if one or more elements are yellow
Red if one or more elements are red.
Does that make sense?
-
I've answered in another post: https://community.smartsheet.com/discussion/rgy-status-overall-roll
Did it work?
Best,
Andrée
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!