简体   繁体   English

Excel - 条件格式特辑

[英]Excel - Conditional Formatting Special

I have two columns as follows:我有两列如下:

1     FALSE
2     TRUE
3     FALSE
4     FALSE
5     FALSE
6     TRUE
7     FALSE
8     FALSE

Whenever there is a TRUE in the second column, I want to Color the first column to a certain color (RED or GREEN).每当第二列中有一个 TRUE 时,我想将第一列着色为某种颜色(红色或绿色)。 What conditional formatting setting is the way to go?什么条件格式设置是要走的路?

As Scott Craner said in the comment, create a rule with the formula =$B1 .正如 Scott Craner 在评论中所说,使用公式=$B1创建规则。 It will work if you follow the instructions.如果您按照说明进行操作,它将起作用。

  • the current cell must be in Row 1 when you create the rule创建规则时,当前单元格必须位于第 1 行
  • OR, the formula must reference the same row as the current row或者,公式必须引用与当前行相同的行
  • AND, the column letter should be absolute (using a $ sign), while the row number MUST be relative (no $ sign).并且,列字母应该是绝对的(使用 $ 符号),而行号必须是相对的(没有 $ 符号)。

The first two cells of the screenshot have the words typed into the cell, which turns them into booleans.屏幕截图的前两个单元格将单词输入到单元格中,这会将它们转换为布尔值。

Rows 3 and 4 have start with an apostrophe, followed by the word, which makes the cell value text, not boolean第 3 行和第 4 行以撇号开头,后跟单词,使单元格值成为文本,而不是布尔值

Rows 5 and 6 have a formula that returns the boolean第 5 行和第 6 行有一个返回布尔值的公式

在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM