Search code examples
regexgoogle-sheetsgoogle-sheets-formulags-conditional-formattingtextjoin

Conditional format rules for Google Sheets double values


What I'm trying to achieve is whenever a value on a sheet is already written on another sheet it's background color should change.

The range where it should check whether the value is already existing is: B2:AF120 The range from the other sheet where values already exist is: Sheet2!G3:Q58

The custom formula I've tried is:

=match(B2:AF120,indirect("Teams!G3:Q58"),0)

You can see the entire thing on the image below.

https://i.sstatic.net/DVPeh.png


Solution

  • try:

    =REGEXMATCH(B2, TEXTJOIN("|", 1, INDIRECT("Sheet2!G3:Q")))
    

    and the exact match would be:

    =REGEXMATCH(B2, "^"&TEXTJOIN("$|^", 1, INDIRECT("Sheet2!G3:Q"))&"$")