简体   繁体   English

条件格式,如果单元格包含 2 个单元格中的特定文本,则突出显示单元格

[英]Conditional Formatting, Highlight Cell if it Contains Specific Text in 2 Cells

I'm trying to highlight a cell using conditional formatting based on matching criteria in 2 different cells, 1 of which is the cell I want highlighted.我正在尝试使用基于 2 个不同单元格中的匹配条件的条件格式突出显示一个单元格,其中 1 个是我要突出显示的单元格。 In a row if a cell contains "ABC" and "Yes" in another I want the Yes cell highlighted.如果一个单元格在另一个单元格中包含“ABC”和“是”,我希望突出显示“是”单元格。

I've yet to be able to figure out how to get this to work after searching and searching formulas.在搜索和搜索公式后,我还没有弄清楚如何让它工作。 I've tried different IF, AND, etc formulas to no avail.我尝试了不同的 IF、AND 等公式,但无济于事。

Apply the conditional format to the cell that you want to be formatted.将条件格式应用于要设置格式的单元格。 Use a conditional format with a formula.使用带有公式的条件格式。 If you want to evaluate two different cells, you can use the AND() function to combine conditions, for example select cell B and use this CF formula如果要评估两个不同的单元格,可以使用 AND() function 组合条件,例如 select 单元格 B 并使用此 CF 公式

=AND(A1="ABC",B1="Yes")

This formula will evaluate to either TRUE or FALSE and the conditional format will be applied when the result is TRUE.此公式将评估为 TRUE 或 FALSE,并且当结果为 TRUE 时将应用条件格式。

If you want the whole row to change color, select all the cells in row 1 and make sure that the formula locks in the correct columns with the $ sign.如果您希望整行更改颜色,select 第 1 行中的所有单元格,并确保公式使用 $ 符号锁定在正确的列中。

=AND($A1="ABC",$B1="Yes")

In cell A1 , I've put ABC , and in B1 , I've put Yes .在单元格A1中,我输入了ABC ,在B1中,我输入了Yes

Then I used following formula in another cell's conditinal formatting:然后我在另一个单元格的条件格式中使用了以下公式:

=AND(EXACT(A1;"ABC");EXACT(B1;"Yes"))

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 条件格式以突出显示特定单元格而不是空单元格和文本单元格 VBA - Conditional formatting to highlight specific cells but not empty and text cells VBA 如果另一列中的相应行包含特定值,我想使用条件格式突出显示一列中的单元格 - I want to use conditional formatting to highlight a cell in one column if the corresponding line in another column contains a specific value Excel-根据其他突出显示的单元格使用条件格式突出显示单元格 - Excel - Highlight a cell using conditional formatting based on other cells that are highlighted 如果单元格包含文本,则条件格式化整行 - conditional formatting entire row if cell contains text 如果相邻单元格包含特定文本,则查找并突出显示包含文本的单元格 - Find and Highlight Cell Containing Text IF Adjacent Cell Contains Specific Text 如果其他单元格包含特定文本,则将特定单元格的总和放入一个单元格中 - Put in a cell the sum of specific cells if other cells contains a specific text 条件格式-根据其他单元格文本更改单元格颜色 - Conditional Formatting - Changing cell color based on another cells text 如果任何单元格包含指定的文本,则条件格式化整行 - Conditional Formatting Entire Row If Any Cell Contains the Specified Text 条件格式-如果单元格包含零? - Conditional Formatting - If cell contains a zero? 包含来自另一个单元格的值的条件格式文本的公式 - Formula to conditional formatting text that contains value from another cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM