Search code examples
google-sheetssyntaxspreadsheetconditional-formattingnamed-ranges

how to apply conditional formatting to a named range?


I'm searching for a way in google sheets to use a named range, or preferably by referring to a cell using INDIRECT() to specify the range to which the formatting should be conditionally applied.

My approach has been to create a formula in cell A1 which specifies a range, say f1:k10, but which can change dynamically. When I enter =indirect(A1) in the box "Apply to range" then I get the error message "Please enter a valid range"

This tells me that Google Sheets doesn't allow named or indirect ranges as the target range which I want to format. I'm hoping that I'm wrong and that there is a nice simple solution?...

I've tried:

=indirect(a1)
=indirect ($a$1)
indirect(a1)
=range-name
range-name

I've also spent a couple of hours trawling google for an answer

Ideally, when I specify a named range or refer indirectly to a range then I would expect that the specified range will be formatted in accordance with the criteria that I am able to set up in the format rules.


Solution

  • nope, you are right, Google Sheets does not support referenced ranges in Apply to range field.

    kind of same as here:
    Is it possible to assign conditional formatting to a named range in Google Sheets?