Automatic RYGB Lights
Hi All,
Currently I'm trying to make my RYGB column give the right color light when it meets certain criteria. This must be based on a Start Date column, End Date column and a status column, but I can't seem to figure out a formula that works.
So the way it should work is like below:
Is there anyone who might know a solution?
Thanks in advance!
Best Answer
-
Emilio Wright ✭✭✭
@Jeffrey WagemansI created the formula based on your table, although it has gaps and you will begin to notice them when users begin to use the fields. I found one but have not changed the formula since you provided the needed information.
=IF([email protected]= "not started", IF(OR(ISBLANK([Start Date]@row), ISBLANK([End Date]@row)), "Blue", IF([Start Date]@row > TODAY(), "Blue", "Red")), IF([email protected]= "in progress", IF([End Date]@row < TODAY(), "Red", "Yellow"), IF(AND([email protected]= "Completed", [End Date]@row < TODAY()), "Green", IF([email protected]= "Canceled", "Blue", "Blue"))))
I created a formula similar to this on my Project Plans. I opted by not caring what the user had on the Status field unless it was something critical like "At Risk" or "Abandoned" or "Completed". I simply used the Date fields to guide my Status. You can kind of gauge what status it should be based on the dates.
This is a snippet of the formula but I think it conveys the message. Don't mind the parenthesis as I simply cut this from my formula without checking if the parentheses have pairs.
IF(AND(NOT(ISBLANK([Start Date]#)), NOT(ISBLANK([End Date]#))), IF(AND([Start Date]# <= TODAY(), [End Date]# >= TODAY()), "In Progress", IF(AND([Start Date]# <= TODAY(), [End Date]# < TODAY()), "Completed", "Planned Not Started")), "Unplanned"))
Answers
-
Emilio Wright ✭✭✭
@Jeffrey WagemansI can help you make the formula, it would be quite a few nested IF statements. Normally I would take the column that has the most options per group as the initial criteria since it will result in fewer IF statements.
-
Emilio Wright ✭✭✭
@Jeffrey WagemansI created the formula based on your table, although it has gaps and you will begin to notice them when users begin to use the fields. I found one but have not changed the formula since you provided the needed information.
=IF([email protected]= "not started", IF(OR(ISBLANK([Start Date]@row), ISBLANK([End Date]@row)), "Blue", IF([Start Date]@row > TODAY(), "Blue", "Red")), IF([email protected]= "in progress", IF([End Date]@row < TODAY(), "Red", "Yellow"), IF(AND([email protected]= "Completed", [End Date]@row < TODAY()), "Green", IF([email protected]= "Canceled", "Blue", "Blue"))))
I created a formula similar to this on my Project Plans. I opted by not caring what the user had on the Status field unless it was something critical like "At Risk" or "Abandoned" or "Completed". I simply used the Date fields to guide my Status. You can kind of gauge what status it should be based on the dates.
This is a snippet of the formula but I think it conveys the message. Don't mind the parenthesis as I simply cut this from my formula without checking if the parentheses have pairs.
IF(AND(NOT(ISBLANK([Start Date]#)), NOT(ISBLANK([End Date]#))), IF(AND([Start Date]# <= TODAY(), [End Date]# >= TODAY()), "In Progress", IF(AND([Start Date]# <= TODAY(), [End Date]# < TODAY()), "Completed", "Planned Not Started")), "Unplanned"))
-
Hi Emilio!
Thank you so much, it worked!
Help Article Resources
Categories
If you have a unique ID (like ticket number) that is in both sheets, you could use DataMesh if you have access to that or cross sheet formulas to pull in the data you want based on the matching unique ID.<\/p>