To highlight matching columns, we use this logical expression:

The reference to B4 is again mixed.

When either (or both) logicals return TRUE, the rule is triggered and the formatting is applied.

OR returns TRUEif any condition is TRUE.

Excel formula: Highlight duplicate rows

If all conditions are FALSE, the OR function returns FALSE.

AND returns TRUEonly if all the conditions are met.

If any conditions are not met, the AND function returns FALSE.

Excel formula: Highlight entire rows

Excel formula: Highlight rows that contain

Excel OR function

Excel AND function

Article image

Article image

Article image

Article image

Article image