Switch Formula
Hello,
I have recently integrated a project plan from MS plan to Smartsheet's however I can't seem to get the auto RAG Switch function working working as it was in Project Plan. This is the formula I used. Can anyone please help :)
Switch( ([% Complete] = 100), "C", ([Baseline Finish] < Now()), "R", ([Finish] > [Baseline Finish]), "A", ([Finish] <= [Baseline Finish]), "G", True, "ERROR!" )
Answers
-
There is no SWITCH function in Smartsheet. Use nested IF to achieve the same.
-
Thanks for the contribution Sameer, I've tried using IF but it is not working. Do you happen to know how the formula would be set out to achieve the same result please? or anyone else?
-
See if this works,
= IFERROR( IF([% Complete]@row = 100, "C", IF([Baseline Finish]@row < TODAY(), "R", IF([Finish]@row > [Baseline Finish]@row, "A", "G") ) ), "ERROR!")
-
Still not working and says inseparable.
I'd also like to use symbols: Red, Yellow, Green, Blue
Blue being complete
= IFERROR(IF([% Complete]@row) = 100, "C", IF([Baseline Finish]@row) < TODAY(), "R", IF([Actual Finish]@row) > [Baseline Finish]@row, "A", "G"))),"ERROR!")
-
Don't suppose you can help with this one too @Sameer Karkhanis
https://community.smartsheet.com/discussion/88341/if-function/p1?new=1
-
To add to Sameer's excellent advice/answer.
Try something like this.
= IFERROR(IF([% Complete]@row) = 1, "Blue", IF([Baseline Finish]@row) < TODAY(), "Red", IF([Actual Finish]@row) > [Baseline Finish]@row, "Yellow", "Green"))),"ERROR!")
Did that work/help?
I hope that helps!
Be safe and have a fantastic weekend!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
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 thank you for your contribution. It comes back saying #UNPARSEABLE?
-
Happy to help!
Try this instead. (I noticed some errors + I modified it a little)
= IFERROR(IF([% Complete]@row = 1, "Blue", IF(AND([Baseline Finish]@row < TODAY(), [Baseline Finish]@row <> ""), "Red", IF([Actual Finish]@row > [Baseline Finish]@row, "Yellow", "Green"))), "ERROR!")
Did that work?
✅Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!