ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   change cell color based on cell value (https://www.excelbanter.com/excel-worksheet-functions/70065-change-cell-color-based-cell-value.html)

[email protected]

change cell color based on cell value
 
Is there a way I can change the color of a cell based on the value
entered into it?

Basically I want to color a cell RED with a value less than, say, 2.

Any ideas?

Thanks!


Ron de Bruin

change cell color based on cell value
 
You can use Conditional Formatting

Look here
http://www.contextures.com/xlCondFormat01.html

--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message ps.com...
Is there a way I can change the color of a cell based on the value
entered into it?

Basically I want to color a cell RED with a value less than, say, 2.

Any ideas?

Thanks!




jiwolf

change cell color based on cell value
 
yup. see conditional format under help.


wrote in message
ps.com...
Is there a way I can change the color of a cell based on the value
entered into it?

Basically I want to color a cell RED with a value less than, say, 2.

Any ideas?

Thanks!




George

change cell color based on cell value
 
wrote:
Is there a way I can change the color of a cell based on the value
entered into it?

Basically I want to color a cell RED with a value less than, say, 2.

Any ideas?

Thanks!

As Ron and jiwolf mentioned conditional formatting does work and can do
a lot more like borders, background etc

For something as basic as one simple color the old method of number
formatting still works
Check out how negative numbers are red when you use currency format

There are only some basic colors to choose from
[Black], [Blue], [Cyan], [Green], [Magenta], [Red], [White], [Yellow]

and you can only specify 3 (maybe 4 zones) from memory
This example from the help file is self explanatory
[Red][<=100];[Blue][100]
RED for less than or equal to 100 and BLUE for greater than 100

This should work for you under cell number formatting custom
[Red][<=2];[Black]

Hope this helps
George


All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com