ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Add background color to cell (https://www.excelbanter.com/excel-discussion-misc-queries/127371-add-background-color-cell.html)

Rich K.

Add background color to cell
 
Using Excel Professional 2003 - I have a text value in B1 and text value in
I1. If both values are true, I would like to change the background color in
B1 to red. For example, if B1="Overdue" and I1="WebForm" then B1 is
"Overdue" in red otherwise no background color. Tried conditional formatting
but don't think that works when two conditions have to be true.

Also tried IF(AND) statement but don't know what or how to specify the
background variable or word. I know vbRed.
=IF((AND(B2="Overdue",I2="WebForm")),"Overdue".vbR ed,"OVERDUE") doesn't work
- error.

Any help would be appreciated. Thanks.

bigwheel

Add background color to cell
 
Conditional formatting works for this. Try putting the condition as as
formula i.e. Formula Is, then enter =AND(B1"",I1"") and set the formatting
you want. If the two cells are greater than null, the cell should change
colour

"Rich K." wrote:

Using Excel Professional 2003 - I have a text value in B1 and text value in
I1. If both values are true, I would like to change the background color in
B1 to red. For example, if B1="Overdue" and I1="WebForm" then B1 is
"Overdue" in red otherwise no background color. Tried conditional formatting
but don't think that works when two conditions have to be true.

Also tried IF(AND) statement but don't know what or how to specify the
background variable or word. I know vbRed.
=IF((AND(B2="Overdue",I2="WebForm")),"Overdue".vbR ed,"OVERDUE") doesn't work
- error.

Any help would be appreciated. Thanks.


Rich K.

Add background color to cell
 
Thank you. Worked like a charm - my mistake was trying to do in two
statements instead of combining into one.

"bigwheel" wrote:

Conditional formatting works for this. Try putting the condition as as
formula i.e. Formula Is, then enter =AND(B1"",I1"") and set the formatting
you want. If the two cells are greater than null, the cell should change
colour

"Rich K." wrote:

Using Excel Professional 2003 - I have a text value in B1 and text value in
I1. If both values are true, I would like to change the background color in
B1 to red. For example, if B1="Overdue" and I1="WebForm" then B1 is
"Overdue" in red otherwise no background color. Tried conditional formatting
but don't think that works when two conditions have to be true.

Also tried IF(AND) statement but don't know what or how to specify the
background variable or word. I know vbRed.
=IF((AND(B2="Overdue",I2="WebForm")),"Overdue".vbR ed,"OVERDUE") doesn't work
- error.

Any help would be appreciated. Thanks.



All times are GMT +1. The time now is 08:21 PM.

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