如何基于另一组单元格中的文本更改一个单元格的文本颜色 [英] How to change the text color of one cell based on text in another group of cells

查看:72
本文介绍了如何基于另一组单元格中的文本更改一个单元格的文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难根据在不同单元格中写入的内容来更改特定单元格中文本的颜色。例如如果在 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.

这篇关于如何基于另一组单元格中的文本更改一个单元格的文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆