ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   conditional formatting - multiple condition (https://www.excelbanter.com/excel-discussion-misc-queries/40456-conditional-formatting-multiple-condition.html)

jenhow

conditional formatting - multiple condition
 
Are the conditions listed in multiple conditions depending on each other?

I have a condition currently that is =$C1=$A$1 and shades the row yellow. I
would like to add a separate condition (not dependent on this one) that would
say if cell is equal to 0, font would be white. It this possible? Currently
when I add this as a second condition, it does not work.

What am I missing?

Thanks.

Roy Wagner

If C1=A1 is FASLE (condition 1) and if the cell = 0 is TRUE, then the white
font (condition 2) should be applied, otherwise it is ignored. If this does
not happen, then you have an error in the CF condition. When there are more
than one condition, the first one that is met is applied and the rest are
ignored. If you really need 2 conditions to operate independently, this would
have to be done using vba code acting on the worksheet change event. Another
alternative, if the 0 is a calculated value, the zero can be suppressed like
so...

=IF(yourformula=0,"",yourformula)

Roy



"jenhow" wrote:

Are the conditions listed in multiple conditions depending on each other?

I have a condition currently that is =$C1=$A$1 and shades the row yellow. I
would like to add a separate condition (not dependent on this one) that would
say if cell is equal to 0, font would be white. It this possible? Currently
when I add this as a second condition, it does not work.

What am I missing?

Thanks.


Bob Phillips

The order is certainly important, because as soon as CF gets a match, it
takes that format and stops. So if C1=A1 even when the cell is 0, it will
not test for zero.

Maybe you need an AND test

=AND($C1=$A$1,cell<0)

then another condition to test the cell for 0

replace cell with the cell address.

Either that or reverse the order.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jenhow" wrote in message
...
Are the conditions listed in multiple conditions depending on each other?

I have a condition currently that is =$C1=$A$1 and shades the row yellow.

I
would like to add a separate condition (not dependent on this one) that

would
say if cell is equal to 0, font would be white. It this possible?

Currently
when I add this as a second condition, it does not work.

What am I missing?

Thanks.




CLR

Set your first CF as Formula is =AND($A1=$C1,$C1=0), and format as both your
yellow background and your White font,
Then, set your second CF as Formula is =$A1=$C1, and format only for your
yellow background.
Then set your third CF as CellValue is 0, and format only for White font

...'er something like that to get the combination you want......

CF is a fussy critter....you just have to keep fooling with it.

Vaya con Dios,
Chuck, CABGx3



"jenhow" wrote:

Are the conditions listed in multiple conditions depending on each other?

I have a condition currently that is =$C1=$A$1 and shades the row yellow. I
would like to add a separate condition (not dependent on this one) that would
say if cell is equal to 0, font would be white. It this possible? Currently
when I add this as a second condition, it does not work.

What am I missing?

Thanks.


Roy Wagner

.... or what Chuck and Bob said... :)




"Bob Phillips" wrote:

The order is certainly important, because as soon as CF gets a match, it
takes that format and stops. So if C1=A1 even when the cell is 0, it will
not test for zero.

Maybe you need an AND test

=AND($C1=$A$1,cell<0)

then another condition to test the cell for 0

replace cell with the cell address.

Either that or reverse the order.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jenhow" wrote in message
...
Are the conditions listed in multiple conditions depending on each other?

I have a condition currently that is =$C1=$A$1 and shades the row yellow.

I
would like to add a separate condition (not dependent on this one) that

would
say if cell is equal to 0, font would be white. It this possible?

Currently
when I add this as a second condition, it does not work.

What am I missing?

Thanks.





jenhow

Thanks. Those suggestions worked great, as always.

"jenhow" wrote:

Are the conditions listed in multiple conditions depending on each other?

I have a condition currently that is =$C1=$A$1 and shades the row yellow. I
would like to add a separate condition (not dependent on this one) that would
say if cell is equal to 0, font would be white. It this possible? Currently
when I add this as a second condition, it does not work.

What am I missing?

Thanks.



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

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