Conditional formatting is evaluated relative to every cell it is applied to, starting with the active cell in the selection, which is cell B5 in this case. To highlight the matching row, we use this logical expression: The reference to B5 is mixed, with the column locked and row unlocked, so that only values in column B (widths) are compared to the value in K6 (width). In the example shown, this logical expression will return TRUE for every cell in a row where width is 200, based on an approximate match of the value in K6 (width, 275) against all values in K6:B11 (widths). This is done with LOOKUP function: Like the MATCH function, LOOKUP will run through sorted values until a greater value is found, then “step back” to the previous value, which is 200 in this case. To highlight the matching column, we use this logical expression: The reference to B5 is mixed, with the column relative and row absolute, so that only values in row 5 (heights) are compared to the value in K7 (height). In the example shown, this logical expression will return TRUE for every cell in a row where height is 300, based on an approximate match of the value in K7 (height, 325) against all values in C5:H5 (heights). This is done with LOOKUP function: As above, LOOKUP will run through sorted values until a greater value is found, then “step back” to the previous value, which is 300 in this case.

### Highlight intersection only

To highlight the intersection only, just replace the OR function with the AND function:

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.