简体   繁体   English

根据组中一个单元格的值对一组单元格进行颜色格式化

[英]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 . 与条件格式一起使用的公式仅需要返回TRUEFALSE

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.

相关问题 如何根据另一组单元格中的文本更改一个单元格的文本颜色 - How to change the text color of one cell based on text in another group of cells 基于是或否的颜色对单元格进行条件格式设置 - Conditional Formatting of cells with color based on yes no values Excel-从一组单元格中检索单元格值 - Excel - retrieving cell values from a group of cells PHPExcel 如何设置条件格式以根据单元格值更改单元格背景颜色 - PHPExcel How to set conditional formatting to change cell background color based on cells values 根据单元格的输入值对行进行颜色格式化 - Color formatting of Rows based on input values for a cell 条件格式-根据其他单元格文本更改单元格颜色 - Conditional Formatting - Changing cell color based on another cells text 根据一组具有不同颜色的单元格更改单元格颜色 - Change a cell colour based on a group of cells with different colours 基于值第一列单元格的行组的背景颜色 - Background color of rows group based on value first column cells 根据其他单元格中的值显示一个或多个单元格的值 - Displaying value of one cell or multiple cells based on values in other cells 基于行中其他单元格的值和内部颜色的单元格内部颜色格式 - Cell Interior Color formatting based on other cells' value AND interior color in row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM