# Conditional Formatting, formula required to compare rows of number in a column.

#### hotrod

##### Board Regular
I need to compare row 2 number with row 1 number.
If row 2 number is higher than row 1 number, row 2 cell to be highlighted green.
Then compare row 3 number with row 2 number.
Same again if row 3 number is higher than row 2 number, row 3 cell to be highlight green.
I have quite a few rows to do.

Example
R1 - 10.50
R2 - 11.75 (green)
R3 - 9.10
R4 - 9.05
R5 - 20.50 (green)

### Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

#### lenze

##### Legend
Select R2. Choose Format>Conditional Formatting. Choose "Formula Is"
Code:
``=\$R\$2>\$R\$1``
Select your format. Use the Format PaintBrush to copy down Colunm "R"
lenze

#### hotrod

##### Board Regular
Lenze
I had the formula right, however I was copy paste special, paste format, did not work.
PaintBrush? Need more details on Select your format. Use the Format PaintBrush to copy down Colunm "R"
Don't understand what you mean.
I copied R1 and R2, clicked on Format Painter, highlighted the column and every second row was green.
Tried a couple of other ways, did not work.

#### lenze

##### Legend
Just select R2, since R1 has no CF. Now the PaintBrush will copy the CF from R2 down as needed. The Copy>PasteSpecial>Formats method will also work!

lenze

#### hotrod

##### Board Regular
Still can't solve my problem.

What I'm getting is, if I paint to the rest of the cells formulas are...
R1 - 10.50
R2 - 11.75 =\$R\$2>\$R\$1 - cell green
R3 - 9.10 =\$R\$2>\$R\$1- cell green
R4 - 9.05 =\$R\$2>\$R\$1 - cell green
R5 - 20.50 =\$R\$2>\$R\$1 - cell green

What I need is ...
R1 - 10.50
R2 - 11.75 =\$R\$2>\$R\$1 - cell green
R3 - 9.10 =\$R\$3>\$R\$2 - cell should not be green
R4 - 9.05 =\$R\$4>\$R\$3 - cell should not be green
R5 - 20.50 =\$R\$5>\$R\$4 - cell green

#### hotrod

##### Board Regular
Solved my problem. Just need to take out the \$ to make it all work.
Lenze thanks for steering me in the right direction.

Replies
5
Views
481
Replies
2
Views
678
Replies
5
Views
873
Replies
7
Views
415
Replies
8
Views
343

1,191,386
Messages
5,986,315
Members
440,017
Latest member
vasanrajeswaran

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back