Changing colours in response to differing input conditions

C

Charles O'Flynn

I'd like to change the background colour of a cell dependant upon the result of a formula inside the cell. For instance, if the result of the calculation is less than or equal to 25, the background should be green. If the result returned is greater than 25 but less than 30, perhaps the colur could change to orange. A value of 30 or more would see the colour changing to red. Any ideas, please
I would have thought this would have been a common question but I've seen nothing about this anywhere. Having said that, I also thought that having a function that returns the date an entry was created (i.e., when the contents of a cell became non-zero) would have been obvious also..
Thanks and regards
Charles
 
C

Chip Pearson

Charles,

Go to the Format menu, and choose Conditional Formatting. This
will do what you want.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


message
I'd like to change the background colour of a cell dependant
upon the result of a formula inside the cell. For instance, if
the result of the calculation is less than or equal to 25, the
background should be green. If the result returned is greater
than 25 but less than 30, perhaps the colur could change to
orange. A value of 30 or more would see the colour changing to
red. Any ideas, please?
I would have thought this would have been a common question but
I've seen nothing about this anywhere. Having said that, I also
thought that having a function that returns the date an entry was
created (i.e., when the contents of a cell became non-zero) would
have been obvious also...
 
P

Peo Sjoblom

Format>conditional formatting>cell value is
you need to use all 3 conditions (click Add button for condition 2 and 3)

--


For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom

Charles O'Flynn said:
I'd like to change the background colour of a cell dependant upon the
result of a formula inside the cell. For instance, if the result of the
calculation is less than or equal to 25, the background should be green. If
the result returned is greater than 25 but less than 30, perhaps the colur
could change to orange. A value of 30 or more would see the colour changing
to red. Any ideas, please?
I would have thought this would have been a common question but I've seen
nothing about this anywhere. Having said that, I also thought that having a
function that returns the date an entry was created (i.e., when the contents
of a cell became non-zero) would have been obvious also...
 
D

DDM

Charles, I'll address your first question (changing background color of
cell). Use the Conditional Formatting feature on the Format menu.

Set up your first condition as "Cell Value is less than or equal to 25,"
then set up the format, selecting green from the Patterns tab. Repeat the
procedure for the other two conditions.

--
DDM
"DDM's Microsoft Office Tips and Tricks"
Visit us at www.ddmcomputing.com


Charles O'Flynn said:
I'd like to change the background colour of a cell dependant upon the
result of a formula inside the cell. For instance, if the result of the
calculation is less than or equal to 25, the background should be green. If
the result returned is greater than 25 but less than 30, perhaps the colur
could change to orange. A value of 30 or more would see the colour changing
to red. Any ideas, please?
I would have thought this would have been a common question but I've seen
nothing about this anywhere. Having said that, I also thought that having a
function that returns the date an entry was created (i.e., when the contents
of a cell became non-zero) would have been obvious also...
 
N

Norman Harker

Hi Charles!

Take a look at Format > Conditional Formatting

You can use your three formats in sequence:

Cell value is less than or equal to 25
Cell value is less than 30
Cell value is greater than or equal to 30

In processing the conditions it is the first condition that is
satisfied determines the format.

You'll find plenty of examples of conditional formatting if you do a
Google search on Conditional Formatting. Use Ron de Bruin's Google
search tool from:

http://www.rondebruin.nl/Google.htm

It will make searching for Excel answers a lot easier.
 
Top