View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Cell text and background colour dependant on result

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 tabStylesConditional FormattingManage rulesNew ruleUse 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
OKOK

New ruleUse 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 FormatConditional 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


--
Biff
Microsoft Excel MVP


"Darren" wrote in message
...
To simplify my problem, I will narrow down the results.

The result of a calculation is shown as a percentage. Is it possible to
format the cell to display the result in different colours dependant on
it's
value?

Example:
Below 50% - White background, green text
50% and over - Yellow background and red text.