简体   繁体   English

根据另一列的值对整列进行条件格式化

[英]Conditional formatting a whole column based on the value of another column

I would like to apply conditional formatting to all of my column D. If Column D is < or > then the value in F by 150 (in the same row), I want it to highlight red.我想对我的所有列 D 应用条件格式。如果列 D 是 < 或 > 那么 F 中的值乘以 150(在同一行中),我希望它突出显示红色。 If the value of D is within the 150 above of below of the value in F then I want it to highlight green.如果 D 的值在 F 值的上下 150 之间,那么我希望它突出显示绿色。

For example: D2 (360) is more than 150 more than F2 (88), so I want it to highlight red.例如:D2(360)比F2(88)高150多,所以我想让它高亮红色。 D10 (200) if within the 150 more or less range than F10 (275) so I want it to highlight green. D10 (200) 如果在比 F10 (275) 多或少 150 的范围内,所以我希望它突出显示绿色。

Below is the picture for the fields下面是字段的图片

Fields and Data字段和数据

在此处输入图片说明

Format your cells all green.将您的单元格格式化为全部绿色。 Then apply CF to cells where the difference is greater than 150 to colour those cells red.然后将 CF 应用于差异大于 150 的单元格以将这些单元格着色为红色。 Here is the formula to use.这是要使用的公式。

=ABS(D2-F2)>150

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

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