You can do this with conditional formatting. How you apply it depends on
what version of Excel you're using.
Assume the cell of interest is A1
For Excel 2007:
Select cell A1
Goto Home tab>Styles>Conditional Formatting>Manage rules>New rule>Use a
formula to determine which cells to format
Enter this formula in the box below:
=AND(COUNT(A1),A1<0.5)
Click the Format button
Select the Font tab
Select a shade of GREEN
OK>OK
New rule>Use a formula to determine which cells to format
Enter this formula in the box below:
=AND(COUNT(A1),A1>=0.5)
Click the Format button
Select the Font tab
Select a shade of RED
Select the Fill tab
Select a shade of YELLOW
OK out
For other versions of Excel:
Select cell A1
Goto the menu Format>Conditional Formatting
Condition 1
Select the Formula Is option
Enter this formula in the box on the right:
=AND(COUNT(A1),A1<0.5)
Click the Format button
Select the Font tab
Select a shade of GREEN
OK
Click the Add button
Condition 2
Select the Formula Is option
Enter this formula in the box on the right:
=AND(COUNT(A1),A1>=0.5)
Click the Format button
Select the Font tab
Select a shade of RED
Select the Patterns tab
Select a shade of YELLOW
OK out