Using IF - AND to return color symbol based on data range
Hello -
I'm having trouble with a formula and need some help. I want a cell to return a symbol for "Position Health" that is either Red, Green, or Yellow, with each being based on a specific data range that is represented in a different cell [Days Open]. For this range, Green would equate to </= 60 days, Yellow would be 61-90 days, and Red is greater than 90 days.
Here is the formula I'm using: =IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", IF(AND([Days Open]@row > 90, "Red"))))
This is giving me an "Incorrect Argument Set" return. Any help would be greatly appreciated.
Best Answers
-
In your last argument set for RED you still have the AND command you do not need.
Try this...
=IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", IF([Days Open]@row > 90, "Red")))
-
Hi @SNolan16 ,
It's most likely the last "IF" statement causing issues, you do not need an "AND" since you are only looking at 1 criteria.
Change it to the following.
=IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", IF([Days Open]@row > 90, "Red")))
Alternatively, you can remove the last "IF altogether since it would be anything that wasn't already caught.
=IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", "Red"))
Hope this helps,
Dave
Answers
-
In your last argument set for RED you still have the AND command you do not need.
Try this...
=IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", IF([Days Open]@row > 90, "Red")))
-
Hi @SNolan16 ,
It's most likely the last "IF" statement causing issues, you do not need an "AND" since you are only looking at 1 criteria.
Change it to the following.
=IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", IF([Days Open]@row > 90, "Red")))
Alternatively, you can remove the last "IF altogether since it would be anything that wasn't already caught.
=IF([Days Open]@row <= 60, "Green", IF(AND([Days Open]@row > 60, [Days Open]@row <= 90), "Yellow", "Red"))
Hope this helps,
Dave
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!