Status formula based on mult. conditions

How do I write a formula that would change a cell with drop down 3 tier symbols (Red, yellow, green) for the following. This would be in sheet summary - if all priority items are on time, its green. if only one is behind, its yellow, and if two or more are behind ,the project is red status
Green: IF [Priority] is checked, and {Due date] is in the past, and done is checked
Yellow: ONLY ONE - IF [Priority] is checked, and {Due date] is in the past, and done is not checked
Red: TWO OR MORE - IF [Priority] is checked, and {Due date] is in the past, and done is not checked
Answers
-
Try something like this...
=IF(COUNTIFS(Priority:Priority, 1, [Due Date]:[Due Date], @cell >= TODAY(), Done:Done, 1) = COUNTIFS(Priority:Priority, 1), "Green", IF(COUNTIFS(Priority:Priority, 1, [Due Date]:[Due Date], @cell <= TODAY(), Done:Done, @cell <> 1) = 1, "Yellow", "Red"))
-
thank you!