if-then-else logical function
I have a symbol column valued ( green, yellow,red). I want to set the color based on a logical formula as follows: There is Start and a Finish date columns.
if ((Start <= Finish - 8, "Green"), IF(AND(Start > Finish - 8 , Start <= Finish), "Yellow"), IF(Start > Finish, "Red")
Anyone, can you correct this? Thanks
Art
Comments
-
Pretty good start!
There were a couple issues. 1) You weren't indicating a row number. I have coded this formula to be used in row 24. 2) You were closing each portion of the IF statement, thus ending it early. You have to nest the IF statements within each other and close them at the end. You can see that in the second statement that I closed the AND but didn't close the IF statement till the end.
Here is the revised formula:
=IF(Start24 <= Finish24 - 8, "Green", IF(AND(Start24 > Finish24 - 8 , Start24 <= Finish24), "Yellow", IF(Start24 > Finish24, "Red")))
-
worked nicely, thanks. Red condition can't be met because Start is never allowed to be greater that Finish. I went to project settings, and it didn't clarify the attributes of Start and Finish. Thanks again
-
What about if today's date is greater than the finish date? Would you want that red? If so, try this:
=IF(Start24 <= Finish24 - 8, "Green", IF(AND(Start24 > Finish24 - 8 , Start24 <= Finish24), "Yellow", IF(Today() > Finish24, "Red")))
Just a thought.
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
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives