Search code examples
if-statementgoogle-sheetsgoogle-sheets-formulaconditional-formatting

Google Sheets - Conditional Formatting based on value of cell in another sheet - Custom Formula


How can I achieve the following:

  • Sheet1: has a range of cells A1:M13 which have conditional format rules: if text is exactly "1" (to "15" so 15 rules) → each number gives the cell a different background filling.
  • Sheet2: I want do Conditional Formatting on range A1:M13 based on the cell values in Sheet1!A1:M13.

At the moment I have the following custom formula in conditional formatting:

=if((INDIRECT("Sheet1!A1:M13=1")))

What do I do wrong? Do I have to set format of Sheet1 to value=1 instead of text is exactly "1"?


Solution

  • Apply this to range A1:M13 in Sheet2 for cell to cell comparison:

    =1=INDIRECT("Sheet1!"&CELL("address",A1))
    

    enter image description here