ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF statements if the value is True it changes the cell colour? (https://www.excelbanter.com/excel-worksheet-functions/33853-if-statements-if-value-true-changes-cell-colour.html)

J. Kerr

IF statements if the value is True it changes the cell colour?
 
Is there a way to change the colour of the cell when using an IF statement.
ie: I would like to see the cell Green if it is TRUE and Red if it is FALSE

Peo Sjoblom

No need for if statements,

=A1

as opposed to =IF(A11

look up conditional formatting in help

--
Regards,

Peo Sjoblom

(No private emails please)


"J. Kerr" <J. wrote in message
...
Is there a way to change the colour of the cell when using an IF
statement.
ie: I would like to see the cell Green if it is TRUE and Red if it is
FALSE



bj

use <format<conditional format formula is your if statement format green
use your if statement with a NOT in front with format red

"J. Kerr" wrote:

Is there a way to change the colour of the cell when using an IF statement.
ie: I would like to see the cell Green if it is TRUE and Red if it is FALSE


David McRitchie

The easiest way is to use Conditional Formatting
Conditional Formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm

The formula used in Conditional Formatting is a worksheet formula
and you want to think in terms of selecting an entire column rather
than an individual cell at a time.


select column C1 then column C, just so you have C1 as the active cell
format, conditional formatting
formula is: =C120 is going to be True (used) or False (ignored) errors are ignored
format button, use patterns then chose color for interior

---
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

"J. Kerr" <J. wrote in message ...
Is there a way to change the colour of the cell when using an IF statement.
ie: I would like to see the cell Green if it is TRUE and Red if it is FALSE





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

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