[英]color formatting a group of cells based on values of one cell inside the group
I have a table with few "2*3 matrix" like this: 我有一张桌子,上面只有几个“ 2 * 3矩阵”:
A1 B1 A1 B1
A2 B2 A2 B2
A3 B3 A3 B3
I want each "matrix" is highlighted if related cell B3 with specific string. 如果相关单元格B3与特定字符串相关联,我希望每个“矩阵”都突出显示。
It works if i list all condition 如果我列出所有条件,它会工作
eg:if cell B3 with string "2A",that "matrix" will highlighted. 例如:如果单元格B3带有字符串“ 2A”,则“矩阵”将突出显示。
works: =OR(A1:B3="2A",A1:B3="2A2",A1:B3="2AT",A1:B3="2AT2") 作品:= OR(A1:B3 =“ 2A”,A1:B3 =“ 2A2”,A1:B3 =“ 2AT”,A1:B3 =“ 2AT2”)
not works: =SEARCH("2A",A1:B3,1) //only B3 will highlighted 不起作用:= SEARCH(“ 2A”,A1:B3,1)//仅B3将突出显示
Formulas used with conditional formatting need to return only TRUE
or FALSE
. 与条件格式一起使用的公式仅需要返回TRUE
或FALSE
。
Function SEARCH
returns an error if a match isn't found, or a Position Number if a match is found. 如果找不到匹配项,则函数SEARCH
返回错误;如果找到匹配项,则返回位置编号。
Perhaps you could use ISERROR
to determine if SEARCH
returns an error (and reverse the results with NOT
): 也许您可以使用ISERROR
来确定SEARCH
返回错误(并使用NOT
反转结果):
=NOT(ISERROR(SEARCH("1A2b",A1:B3,1)))
...returns TRUE if the search text is found, or FALSE if an error has occurred. ...如果找到搜索文本,则返回TRUE;如果发生错误,则返回FALSE 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.