如何基于另一组单元格中的文本更改一个单元格的文本颜色

问题描述:

我很难根据在不同单元格中写入的内容来更改特定单元格中文本的颜色。例如如果在 F3:F5 中的任何一个单元格中找到确切的文本,则 E8 中的文本将变为绿色。 >。
我已经可以对 = SEARCH( text $ F $ 3)的单个单元格执行此操作,但是我无法为一组单元格编写代码。
这个单元格需要三个独立的规则吗?还是只有一条规则?

I am having difficulties being able to change the color of text in a particular cell based on what is written in a different group of cells. Ex. The text in E8 is to change to green if that exact text is found in any one of the cells in F3:F5. I have been able to do this for individual cells =SEARCH("text"$F$3) but I am having trouble writing for a group of cells. Do I need to have 3 separate rules for this one cell? or is there a way to only have one rule?

谢谢

提供的条件是,您实际上只希望对一个单元格使用一个较短的公式:

Provided you really only want this for a single cell, a slightly shorter formula:

=COUNTIF(F3:F5,E8)

通过选择E8并清除其中所有退出的CF以及HOME>样式-有条件的来应用格式化,新规则...,使用公式来确定要格式化的单元格,并在此公式为真的情况下设置值的格式: 如上所述,然后 Format ... ,选择绿色填充,确定确定

to be applied by selecting E8, clearing any exiting CF from it and and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true: as above, then Format..., select green fill, OK, OK.