I am trying to highlight the cell by conditional formatting by comparing two columns B and C
The condition is like to ignore BLANKS even if both columns have blanks on same row ,only to highlight the matching values So I wrote
=AND(B2=C2,C2<>"")
Please note the empy cells are not empty . If we click on empty cell , there's a hidden IF
formula .But the value of cell is blank.
Its not working . Pls help
=AND($B2<>"",$C2<>"",$B2=$C2)
Follow the steps in the below GIF to see how to use it - Conditional Formatting GIF
Fixate only the columns B and C, and make sure that you apply the rule on the first cells of the selected range, in this case it's row number 2. Excel will look interpret the formula this way -
According to 5 - Excel loops over your selected range like this -
=AND($B3<>"",$C3<>"",$B3=$C3)
=AND($B4<>"",$C4<>"",$B4=$C4)
...
=AND($B9<>"",$C9<>"",$B9=$C9)
That's an awesome magic trick in Excel's conditional formatting.
For practice purposes, I suggest you try highlighting the whole line according to the same condition. And I also suggest you try to fixate $B$2 and $C$2 - Excel will interpret your formula only on these cells because you fixated it on them, that's a common mistake so watch out.
I hope it helps