Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default Cell text and background colour dependant on result

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
text and background colour Ruth Excel Discussion (Misc queries) 2 October 22nd 08 08:45 AM
In Excel, colour formatting (text and background) reverts to blk malcolm Excel Discussion (Misc queries) 1 July 12th 06 08:14 PM
change a cell background colour to my own RGB colour requirements Stephen Doughty Excel Discussion (Misc queries) 4 June 16th 06 01:08 PM
Enter a value dependant on the colour of a cell cdb Excel Discussion (Misc queries) 4 May 3rd 06 10:00 AM
establishing the background colour of a cell ac512 Excel Discussion (Misc queries) 4 April 15th 05 08:20 PM


All times are GMT +1. The time now is 03:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"