简体   繁体   English

基于其他单元格值的背景色和文本的条件格式

[英]Conditional Formatting for background color and text based another cell value

I want to be able to test the value in cell $A$3 and determine if it has the text "YES" entered. 我希望能够测试$ A $ 3单元格中的值,并确定是否输入了文本“ YES”。 IF $A$3 is "YES" then the cell $D$3 background should be set to a color and the text for cell $D$3 should say "NA". 如果$ A $ 3为“是”,则应将单元格$ D $ 3的背景设置为一种颜色,单元格$ D $ 3的文本应为“ NA”。

I've tried using the following for Microsoft Excel 2003, but does not work. 我已尝试将以下内容用于Microsoft Excel 2003,但不起作用。 Any guidance would be appreciated. 任何指导将不胜感激。 Thank you, Von 谢谢冯

=IF($A$3="YES", "NA","") Additionally, I have the background color set to light Grey when true. = IF($ A $ 3 =“ YES”,“ NA”,“”)另外,我将背景颜色设置为true时为浅灰色。

The background changes color when cell $A$3 is "YES", but the text of "NA" is not visible. 当单元格$ A $ 3为“ YES”时,背景改变颜色,但是“ NA”的文本不可见。

The syntax as given works for me in Excel 2003 SP2. 所给的语法在Excel 2003 SP2中对我有效。

The coloring is done using Format -> Conditional Formatting. 使用格式->条件格式设置完成着色。 When you've got your conditions set up, select the 'Format...' button for each and set the format values the way you want using the dialog. 设置好条件后,为每个条件选择“格式...”按钮,然后使用对话框以所需的方式设置格式值。 There is a limit of three alternate formats that can be applied to a given cell this way. 可以将三种备用格式以这种方式应用于给定单元格的限制。

I know it sounds silly, but did you set both the text color and background color to light gray? 我知道这听起来很傻,但是您是否将文本颜色和背景颜色都设置为浅灰色?

If you used the function in that manner (the correct one), and the background color is changing as expected, then there has to be something else causing this problem. 如果您以这种方式(正确的方式)使用了该功能,并且背景颜色正在按预期方式变化,则可能还有其他原因导致此问题。

在您的条件格式中,请确保指定文本的颜色以及背景。

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

相关问题 条件格式设置或启用宏-根据其他单元格值更改单元格背景色 - Conditional Formatting or Macro Enabled - Change cell background color based on another cell value 条件格式-根据其他单元格文本更改单元格颜色 - Conditional Formatting - Changing cell color based on another cells text 基于最大值和红色新单元格的条件格式 - Conditional Formatting based on highest value and color red the new cell 基于单元格文本的条件格式 - Conditional Formatting based on Cell Text 如果单元格值&lt;&gt;“”,则为条件格式(更改单元格颜色) - Conditional formatting (Change Cell Color) if cell value <> “” 寻求基于日期和另一个单元格的值的条件格式公式 - Seeking conditional formatting formula based on date and another cell's value 使用单元格的值和另一个字符串的条件格式 - Conditional Formatting using the value of a cell and a text string from another 包含来自另一个单元格的值的条件格式文本的公式 - Formula to conditional formatting text that contains value from another cell 自动将使用条件格式的单元格的背景颜色复制到另一个单元格 - Automatically copy the background color of a cell which is using Conditional Formatting, to another cell 基于另一个单元格中的日期的条件格式 - Conditional formatting based on date in another cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM