简体   繁体   English

条件格式仅应用于范围的一个单元格

[英]Conditional formatting applied to only one cell of range

In Excel 2010 a conditional formatting rule based on the values in three adjoining cells in a row is applied to only the first cell of the three rather than to all three cells.在 Excel 2010 中,基于一行中三个相邻单元格中的值的条件格式设置规则仅应用于三个单元格中的第一个单元格,而不是所有三个单元格。 The rule was created when all three cells were selected.当所有三个单元格都被选中时,规则就被创建了。

First, the screenshot:先上截图:

工作表单元格集

The formula is =AND(C12>$E$2,C12<$E$3,D12>$E$4,D12<$E$5,E12>$E$6,E12<$E$7)公式为=AND(C12>$E$2,C12<$E$3,D12>$E$4,D12<$E$5,E12>$E$6,E12<$E$7)

Under Conditional formatting, Manage rules, Applies to is =$C$12:$E$12在条件格式下,管理规则,适用于=$C$12:$E$12

If it matters: the Min & Max values are determined by formulas.如果重要:最小值和最大值由公式确定。 The Altitude, Azimuth & Reflection values are keyed in.高度、方位角和反射值已键入。

The question is: how can the conditional formatting be applied to all three cells?问题是:如何将条件格式应用于所有三个单元格?

You need to put $ in front of all the column letters other wise they will refer to the wrong columns as Conditional Formatting moves across the row:您需要将$放在所有列字母的前面,否则它们会在条件格式跨行移动时引用错误的列:

=AND($C12>$E$2,$C12<$E$3,$D12>$E$4,$D12<$E$5,$E12>$E$6,$E12<$E$7)

Then you can change the Applies to: to =$C$12:$E$20 to capture all the rows.然后您可以将Applies to:更改为=$C$12:$E$20以捕获所有行。

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

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