基于单元格和相邻单元格的Excel条件格式化 [英] Excel conditional formatting based on cell and adjacent cell values

查看:229
本文介绍了基于单元格和相邻单元格的Excel条件格式化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以根据其值以上的单元格在Excel中格式化单元格。
基本上我正在编译一个电子表格,我想让单元格以浅绿色突出显示,如果该值自上述条目以来已经下降,如果增加,我希望它变红。

Is it possible to format a cell in Excel based on the cell above it's value. Basically I'm compiling a spreadsheet and I want the cell to be highlighted in light green if the value has gone down since the entry above and I want it to go red if it has increased.

我确信它很简单,但我只是无法让它工作。

I'm sure its fairly simple but I just cant get it to work.

任何帮助将不胜感激。 >

Any help would be greatly appreciated.

推荐答案

是的,您需要做的是使用条件格式化公式。

Yes, all you need to do is to use Conditional Formatting with a formula.

例如,如果两个单元格是A1和A2,A2是要更改颜色的单元格,那么您将选择A2并从主色带选择条件格式。然后选择新规则和使用公式确定要格式化的单元格。

For example, if the two cells are A1 and A2, with A2 being the cell you want to change color, then you would select A2 and choose Conditional Formatting from the Home ribbon. Then select New Rule and "Use a formula to determine which cells to format."

然后,在公式栏中输入 = A2> ; A1 ,并选择要使用的格式的红色填充。

Then, in the formula bar that comes up enter =A2>A1 and choose the red fill as the format you want to use.

这一次只能工作一个单元格;不能选择一个单元格范围,并根据它自己的相邻单元格预期每个单元格格式

This only works one cell at a time; can't select a range of cell and expect each cell format to based on it's own adjacent cell

然后使用公式 = A2 并选择浅绿色作为格式。

Then create another rule for cell A2 using the formula =A2<A1 and choose light green as the format.

这篇关于基于单元格和相邻单元格的Excel条件格式化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆