问题描述
我很难根据在不同单元格中写入的内容来更改特定单元格中文本的颜色。例如如果在 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>样式-有条件的来应用格式化,新规则...,使用公式来确定要格式化的单元格,并在此公式为真的情况下设置值的格式: 如上所述,然后,选择绿色填充,,。
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 , select green fill, , .
这篇关于如何基于另一组单元格中的文本更改一个单元格的文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!