ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Color in Cell (https://www.excelbanter.com/excel-programming/282360-color-cell.html)

Michael Kintner[_2_]

Color in Cell
 
Based upon an if statement how can I tell the cell value to display in
different font color.

Example: =if(A1=1,{display cell A1 in green},{display A1 in red})

Thanks in advance for any help,
Mike



Ron de Bruin

Color in Cell
 
You can use conditional formatting

Check out this great website Michael
http://www.contextures.com/xlCondFormat01.html

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Michael Kintner" wrote in message ...
Based upon an if statement how can I tell the cell value to display in
different font color.

Example: =if(A1=1,{display cell A1 in green},{display A1 in red})

Thanks in advance for any help,
Mike





david mcritchie

Color in Cell
 
Hi Mike,
If I understand you correctly, you can use normal cell formatting
for that. Of course Conditional Formatting would override
color if you used both.

Format, cells, custom
[Green][=1]"Yes";[Red]"No";[Red]"No";@

[Green][=1]General;[Red]General;[Red]General;@
shows number as green for 1, red for other numbers, black for text

In the US the list separator in Regional Settings is a semi-colon
and the thousands separator is a comma.

Regular Cell Formatting some examples
http://www.mvps.org/dmcritchie/excel...htm#cellformat

Conditional Formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm


--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Ron de Bruin" wrote ...
You can use conditional formatting
Check out this great website Michael
http://www.contextures.com/xlCondFormat01.html

"Michael Kintner" wrote ...
Based upon an if statement how can I tell the cell value to display in
different font color.

Example: =if(A1=1,{display cell A1 in green},{display A1 in red})





All times are GMT +1. The time now is 04:53 PM.

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