Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditional formatting based on cell above

Given these cell values in Excel (say column A):

420
420
480
444
445

If the number above is lower, I want the cell to be highlighted green. If it remains equal, I want the cell highlighted yellow. If the number above is higher, I want the cell highlighted red. In other words; the cells should be formatted (blank), yellow, green, red, green (respectively).

I am having a lot of trouble applying/finding the correct conditional formatting 'rule' here. Anyone that can help me? Thanks a lot! :)

like image 791
Lander Avatar asked Mar 23 '17 19:03

Lander


People also ask

How do you highlight a cell in Excel if value is greater than another cell?

Using the Built-in Rule On the Excel Ribbon's Home tab, click Conditional Formatting, to format the values greater than a specific one, select Highlight Cells Rules and then choose the option Greater Than.

Can you use conditional formatting based on relative cell references?

The Format Painter will work copying the conditional formatting with relative cell references from, for example, cell T3 to cell T4, however, if I drag the Format Painter down cells T4 through T14, it will only use relative cell reference for T4 but not the other cells.


1 Answers

I think what you're looking for is 3 conditional formatting rules.

=A2=A1

=A2<A1

=A1<A2

Set the conditional formatting up in cell A2 and then click on the cell, click on the format painter, and drag it down.

Example

like image 159
user1274820 Avatar answered Sep 28 '22 22:09

user1274820