RYG formula assistance
I have a formula in a RYG column that should change the color based on date and % complete. I think I am missing something. Only red or green will show, i have not successfully made it turn yellow. It will just be blank, red or green.
=IF(OR([% Complete]@row = 1, [Start Date]@row > TODAY()), "Green", IF([End Date]@row < TODAY(), "Red", IF([End Date]@row = TODAY(), IF([% Complete]@row < 0.25, "Red", IF([% Complete]@row < 0.75, "Yellow")), IF([End Date]@row = TODAY(), IF([% Complete]@row > 0.75, "Green", IF([% Complete]@row < 0.25, "Red", IF([% Complete]@row < 0.5, "Yellow")))))))
Best Answer
-
A couple of things. I've recently learned that the Today() function like to ALWAYS be on the left side of the Greater Than (>) or the Less Than (<) symbols. So you'll want to make sure to write your formulas in that order when using Today(). When it comes to equals (=), it doesn't matter.
You might want to take a look and re-evaluate the different combinations that you are trying to RYG. Here is what I was able to gather from your existing formula:
Green
OR([% Complete]@row = 1, [Start Date]@row > TODAY
IF([End Date]@row = TODAY(), IF([% Complete]@row > 0.75
Yellow
IF([% Complete]@row < 0.75
IF([% Complete]@row < 0.5
Red
IF([End Date]@row < TODAY(),
IF(AND([End Date]@row = TODAY(), [% Complete]@row < 0.25)
IF([% Complete]@row < 0.25
All that being said, here is an updated formula where I do get Yellow as a result, but not sure if it is at the level of accuracy that you are looking for:
=IF(OR([% Complete]@row = 1, TODAY() < [Start Date1]@row, AND([End Date1]@row = TODAY(), [% Complete]@row > 0.75)), "Green", IF(OR(TODAY() > [End Date1]@row, AND([End Date1]@row = TODAY(), [% Complete]@row < 0.25), [% Complete]@row < 0.25), "Red", "Yellow"))
Answers
-
A couple of things. I've recently learned that the Today() function like to ALWAYS be on the left side of the Greater Than (>) or the Less Than (<) symbols. So you'll want to make sure to write your formulas in that order when using Today(). When it comes to equals (=), it doesn't matter.
You might want to take a look and re-evaluate the different combinations that you are trying to RYG. Here is what I was able to gather from your existing formula:
Green
OR([% Complete]@row = 1, [Start Date]@row > TODAY
IF([End Date]@row = TODAY(), IF([% Complete]@row > 0.75
Yellow
IF([% Complete]@row < 0.75
IF([% Complete]@row < 0.5
Red
IF([End Date]@row < TODAY(),
IF(AND([End Date]@row = TODAY(), [% Complete]@row < 0.25)
IF([% Complete]@row < 0.25
All that being said, here is an updated formula where I do get Yellow as a result, but not sure if it is at the level of accuracy that you are looking for:
=IF(OR([% Complete]@row = 1, TODAY() < [Start Date1]@row, AND([End Date1]@row = TODAY(), [% Complete]@row > 0.75)), "Green", IF(OR(TODAY() > [End Date1]@row, AND([End Date1]@row = TODAY(), [% Complete]@row < 0.25), [% Complete]@row < 0.25), "Red", "Yellow"))
-
I also find that sometimes it helps to reorder the iF statements. Try putting the yellow IF statement first in the list. What results do you get then?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!