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

hotrod

Board Regular
Joined
Feb 3, 2009
Messages
103
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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
Solved my problem. Just need to take out the $ to make it all work.
Lenze thanks for steering me in the right direction.
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top