Try this for green
Conditional Formatting- Highlight applicable range >> =$B$3:$D$18
- Home Tab >> Styles >> Conditional Formatting >> New Rule
- Select a Rule Type: Use a formula to determine which cells to format
- Edit the Rule Description: Format values where this formula is true: =AND(LEN($B3)>0,$D3>$H3)
- Format… [Number, Font, Border, Fill]
- OK >> OK
For Red
=AND(LEN($B3)>0,$D3<$H3)
Now apply all of this to F3:H18 by changing all the references