[英]Conditional formatting with custom formula
I cannot seem to make my conditional formatting work with a custom formula.我似乎无法使我的条件格式与自定义公式一起使用。 The long and short of it is that the formatting is based on some
VLOOKUP
s.总而言之,格式是基于一些
VLOOKUP
的。 I've tested the formula in a normal cell and it outputs 1 as expected.我已经在普通单元格中测试了公式,它按预期输出 1。
=IF(REGEXMATCH(VLOOKUP(C5,CL!C2:H99,5,FALSE), VLOOKUP(B5,CL!J3:K110,2,FALSE)), 1, 0)
I'm basically testing to see whether a certain tag is included in a cell that contains a comma separated list of tags.我基本上是在测试某个标签是否包含在包含逗号分隔标签列表的单元格中。
The documentation seems to suggest that I need to enter the formula into the box with quotation marks around it ( ""
).文档似乎表明我需要将公式输入到带有引号 (
""
) 的框中。 I've tried all variations I believe.我已经尝试了我相信的所有变体。
I've also tried removing the IF
statement, as REGEXMATCH
outputs true
or false
.我也尝试删除
IF
语句,因为REGEXMATCH
输出true
或false
。
Any clue why this isn't working?任何线索为什么这不起作用?
when attempting conditional formatting to reference another sheet you need to wrap it into INDIRECT
- that's where Google documentation failed.当尝试使用条件格式来引用另一张工作表时,您需要将其包装成
INDIRECT
- 这就是 Google 文档失败的地方。 try:尝试:
=IF(REGEXMATCH(VLOOKUP(C5, INDIRECT("CL!C2:H99"), 5, 0),
VLOOKUP(B5, INDIRECT("CL!J3:K110"), 2, 0)), 1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.