简体   繁体   English

每行单元格的Excel条件格式

[英]Excel conditional formatting per row cells

Is it possible to create a conditional statement to do the following without having to create the conditional format for each row? 是否可以创建条件语句来执行以下操作而无需为每一行创建条件格式?

For each row, if row column D cell is less than the value of row column A cell I want it to highlight red. 对于每一行,如果行列D单元格小于行列A单元格的值,我希望它突出显示红色。 If row column D cell is greater than the value of row column A cell, I want it to highlight green. 如果行列D单元格大于行列A单元格的值,我希望它突出显示绿色。

Example: 例:

if D1 < A1 Highlight RED
if D1 > A1 Highlight GREEN
if D2 < A2 Highlight RED
if D2 > A2 Highlight Green

and so on and so forth.... 等等等等....

在此输入图像描述

Assuming you want Column A's cells to highlight the color, set up your conditional formatting like this: 假设您希望列A的单元格突出显示颜色,请设置条件格式,如下所示:

Formula: =$D1>$A1 for Green, =$D1<$A1 for Red 公式: =$D1>$A1绿色=$D1<$A1 ,红色为=$D1<$A1

Then, make sure the "Applies To" range is correct (this is where I personally usually mess up): 然后,确保“适用于”范围是正确的(这是我个人通常搞砸的地方):

Applies to (for both): $A$1:$A$10 适用于(两者): $A$1:$A$10

在此输入图像描述

If you want the row to highlight, then the "Applies to" range is =$1:$10 or just =$A$1:$D$10 . 如果你想要突出显示 ,那么“适用于”范围是=$1:$10或者只是=$A$1:$D$10

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

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