[英]Google Sheets, formula based conditional formatting
Can custom formula based conditional formatting use NamedRanges ? 基于自定义公式的条件格式可以使用NamedRanges吗?
I'm experiencing that when named range is used, I cannot save the conditional formatting because formula is invalid, but when the NamedRange is replaced by a string it works. 我遇到的问题是,使用命名范围时,由于公式无效,因此无法保存条件格式,但是当NamedRange被字符串替换时,它将起作用。 The docs do not allude to details, AFAIK.
该文档并不暗示详细信息,AFAIK。
ISNUMBER(INDIRECT("ArrivalTimes!$A$4:$S$653")) // OK
ISNUMBER(INDIRECT(RNG_ArrTimes)) // now allowed to save
Is this expected behaviour? 这是预期的行为吗? Any docs available on this?
有任何可用的文档吗?
EDIT; 编辑; based on answer for reader convenience.
基于答案,以方便读者。
AS suggested by @pnuts, it works when the range name is within double quotation marks. 正如@pnuts所建议的那样,它在范围名称位于双引号内时起作用。
However, while INDIRECT expects a string, in Sheets INDIRECT accepts NamedRanges as is without quotation marks. 但是,尽管INDIRECT需要一个字符串,但在Sheets中,INDIRECT照原样接受NamedRanges,而不带引号。 But, for conditional formatting, the named range must be within quotation marks.
但是,对于条件格式,命名范围必须在引号内。 I have not found any docs that document or explain this behavior.
我没有找到记录或解释此行为的任何文档。
Can custom formula based conditional formatting use NamedRanges ?
基于自定义公式的条件格式可以使用NamedRanges吗?
Indeed they can. 确实可以。
The rest of your Q is unclear to me but perhaps it is just that you are missing double quotes around the Name of your range (and =
at the beginning?). 我还不清楚您的其余Q信息,但也许只是您在范围名称(和开头的
=
)中缺少了双引号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.