Status If/And Formulas
I have a project manage sheet I'm managing that I can't seem to get the formulas right in. The first one has two parts.
1) I want the status to be green if the Planned Completion Date is equal to today or the future. The Status to be Yellow if the Planned Completion Date is 1-7 days in the past and the Status to be Red if the Planned Completion Date is 7+ days past. The Green part of the formula works but no matter what I do, everything in the past is Yellow.
=IF([Planned Completion Date]@row >= TODAY(), "Green", IF([Planned Completion Date]@row < TODAY(7), "Yellow", IF([Planned Completion Date]@row < TODAY(14), "Red")))
2) The second part, once that is figured out, is I need the colors to be adjusted where if the Status is Completed with the Planned Completion Date Target being met, I need the status to be Green.
My other question is how do I adjust the status column of a section if the line items under it has either one yellow or one red to make that section status either yellow or red? Screen shot example attached.
These would all be formulas in the same column.
Thoughts, please?
Thank you!
Best Answer
-
The OR bracket needs to be closed.
OR(Status@row = "Completed", [Planned Completion Date]@row >= TODAY())
Answers
-
Hello @Emily T.
Thank you for your post! Upon further review of what you are trying to accomplish, I edited your formula to make it work for the specific criteria you had placed for the statuses.
=IF([Planned Completion Date]@row >= TODAY(), "Green", IF([Planned Completion Date]@row >= TODAY(-7), "Yellow", "Red"))
For the formula to show if the children are all "Green", change the parent to "Green", if not, I used "Red". Feel free to change this too.
=IF(COUNT(CHILDREN([Task Name]@row)) = COUNTIFS(CHILDREN(Status@row), "Green"), "Green", "Red")
I found a similar post to what you are trying to do with the status changing based on the status under it.
Cheers~
Krissia
-
Hi @Krissia B,
Thank you so much! I've been OOO so I wasn't able to promptly respond.
That worked in changing the colors. The second part in this equation is that if the status is marked completed, I need the health to be green, also. Currently with the formula, they're showing red, as the Planned Completion Date is more than 7 days in the past. I took the formula you gave above and tried to add and an "OR" part to the formula looking at other examples online and I must have done something wrong. I get "Incorrect Argument Set" now. Would much appreciate any insight on what adjustments could be made to fix this.
=IF(OR(Status@row = "Completed", [Planned Completion Date]@row >= TODAY(), "Green", IF([Planned Completion Date]@row >= TODAY(-7), "Yellow", "Red")))
Thank you!
Emily
-
The OR bracket needs to be closed.
OR(Status@row = "Completed", [Planned Completion Date]@row >= TODAY())
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!