SOLVED

Conditional formatting OR statement

Copper Contributor

I created a very simple formatting rule however I can't get it to work properly.

I want the cells in the left column to appear orange if they don't match the right column or if the cell itself contains an error. Somehow it doesn't apply the error condition, in the OR statement.

 

Both conditions work on their own.

 

Milliumfolie_1-1652965560068.png

 

 

 

 

2 Replies
best response confirmed by Milliumfolie (Copper Contributor)
Solution

@Milliumfolie 

 

I was able to replicate the same behavior you were seeing.

 

If we enter the formula on the spreadsheet, we can see the OR produces a #VALUE! error.

 

By using Evaluate Formula from the Formula tab of the ribbon, we can see this is because the <> operator produces a #VALUE! error when either of the operands are an error value.

 

orerror.gif

 

So, I think you have two choices:

 

1. Separate them into different rules:

 

flexyourdata_0-1652966449486.png

 

2. Use this instead:

 

=IF(ISERROR(B2),TRUE,B2<>C2)

 

flexyourdata_1-1652966818082.png

 

Thanks for your explanation and solution!
1 best response

Accepted Solutions
best response confirmed by Milliumfolie (Copper Contributor)
Solution

@Milliumfolie 

 

I was able to replicate the same behavior you were seeing.

 

If we enter the formula on the spreadsheet, we can see the OR produces a #VALUE! error.

 

By using Evaluate Formula from the Formula tab of the ribbon, we can see this is because the <> operator produces a #VALUE! error when either of the operands are an error value.

 

orerror.gif

 

So, I think you have two choices:

 

1. Separate them into different rules:

 

flexyourdata_0-1652966449486.png

 

2. Use this instead:

 

=IF(ISERROR(B2),TRUE,B2<>C2)

 

flexyourdata_1-1652966818082.png

 

View solution in original post