Forum Discussion

Jna3276's avatar
Jna3276
Copper Contributor
Sep 02, 2024

Conditional formating using formula

Hi,   I'm looking to apply a conditional format to a table (Table1) which highlights the row where a cell matches a cell within another table (Table2)   I've had a look online, the only thing I c...
  • HansVogelaar's avatar
    HansVogelaar
    Sep 03, 2024

    Jna3276 

    Select the data rows of the table on Sheet 1 (i.e. A2:G8).

    Create a conditional formatting rule of type 'Use a formula to determine which cells to format' with formula

    =ISNUMBER(XMATCH($A2, Sheet2!$C$2:$C$5))

    or

    =COUNTIF(Sheet2!$C$2:$C$5, $A2)

    You can't use structured table references in conditional formatting rules. But Excel will automatically adjust the rule when the table expands/shrinks.

Resources