Help with Conditional Formatting for "Overall Health" Column

Hi everyone,
I need help modifying my "Overall Health" column to account for more than two different colors in a row. Right now, my logic works as follows:
- If all values are green, the overall health is green.
- If there is at least one yellow and the rest are green, the overall health is yellow.
- If there is at least one red, the overall health is red.
Now, I need to add these additional conditions:
- If there is at least one red and one yellow and/or green, the overall health should be red.
- If there is any gray, the overall health should be gray (overriding other colors).
How can I implement this logic correctly? Any help would be greatly appreciated!
Thanks in advance!
Best Answer
-
You have already solved new condition 1. If there are more than 0 reds then it will be red.
For condition 2, you need to move the grey logic to the start of the formula (the order is what allows it to override). If there is more than 0 gray, return gray (overriding all other colors).
If not, then it will look at red, if there is more than 0 red, then return rend.
If no reds, then it will look at yellow, and return yellow if there is atleast 1 yellow, and if none of those things are true, it will return green.
=IF(COUNTIF(Resources@row:Budget@row, "Gray") > 0, "Gray", IF(COUNTIF(Resources@row:Budget@row, "Red") > 0, "Red", IF(COUNTIF(Resources@row:Budget@row, "Yellow") > 0, "Yellow", "Green")))
Answers
-
You have already solved new condition 1. If there are more than 0 reds then it will be red.
For condition 2, you need to move the grey logic to the start of the formula (the order is what allows it to override). If there is more than 0 gray, return gray (overriding all other colors).
If not, then it will look at red, if there is more than 0 red, then return rend.
If no reds, then it will look at yellow, and return yellow if there is atleast 1 yellow, and if none of those things are true, it will return green.
=IF(COUNTIF(Resources@row:Budget@row, "Gray") > 0, "Gray", IF(COUNTIF(Resources@row:Budget@row, "Red") > 0, "Red", IF(COUNTIF(Resources@row:Budget@row, "Yellow") > 0, "Yellow", "Green")))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 207 Use Cases
- 517 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!