简体   繁体   English

基于另一个单元格值的条件Excel格式

[英]Conditional Excel formatting based on another cells value

I want to take a cell and format it based on the value of another cell. 我想获取一个单元格并根据另一个单元格的值对其进行格式化。 For example 例如

I want to from A23 based on the value of C23 but when I select A23 and ass this formula it only formats D23. 我想基于C23的值从A23开始,但是当我选择A23并设置此公式时,它仅格式化D23。 Also is there a way to duplicated this easily for 29 other rows? 还有一种方法可以轻松地将其复制到其他29行吗? A22/D22 for example. 例如A22 / D22。

="D23<1%"

Select all of the cells you want to apply the conditional formatting rule to with the cell in the top-left as the active cell. 选择要对其应用条件格式设置规则的所有单元格,并将左上角的单元格作为活动单元格。 Note the row of this cell. 注意此单元格的行。 For the sake of argument, I'll say this is row 22. 为了争辩,我将说这是第22行。

Clear out the previous attempts at a conditional formatting rule and start a new one. 清除先前对条件格式设置规则的尝试,然后开始新的尝试。 Choose Use a formula to determine which cells to format then supply the following in the Format values where this formula is true: text box. 选择“ 使用公式来确定要格式化的单元格”,然后在“ 此公式为真的格式值”中提供以下内容文本框。

=$D22<0.01

Note that I've used row 22 in this formula. 请注意,我在此公式中使用了第22行。 That should be changed to whatever row your block of cells to receive the CF rule starts with. 应该将其更改为您的接收CF规则的单元格所在的任何行。

Click Format and select some formatting. 单击格式,然后选择一些格式。 Click OK to confirm the formatting choices and then OK again to create the new rule. 单击确定再次OK确认格式化选项,然后创建新规则。

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

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