@Yehuda Ordower
1) Select all of Column W
2) select new rule in the conditional formatting options and select the option to use formulas to format
3) Type in: =AF1="Closed", select the fill colour in the format options to be red and click OK
4) Select column W, New Rule and the option to use formulas to format again
5) Type in: =OR(AND(H1="P", N1>O1, W1<1), AND(H1="C", O1>N1, W1<1)) and select the fill colour in the format options to be Yellow. Then Click OK