Conditional formatting problem

Susan1968

New Member
Joined
Feb 4, 2014
Messages
29
Hi,

I am trying to apply conditional formatting to Cells D4:D80 that would change colour based on the value in each cell being lees than or greater than the previous cell... i.e. if D4 is £25.00 and C4 is £20.00 then i want D4 to turn Green if its less I need it to turn red. I can manage to do this for one cell but when i try to drag down the formula from D4 to D80 so C8 affects D8 it wont allow me to do this. If someone can help me to solve this i would need to use format painter and apply the same Conditional formatting to Columns 8, 12,16,20 and so on

Im not sure how to attach a copy of the file.. so hopefully this chart helps to visualize what i need.

Thanks in Advance

Susan

[TABLE="width: 581"]
<tbody>[TR]
[TD="colspan: 4"][/TD]
[/TR]
[TR]
[TD="colspan: 4"][TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD="align: center"]Case[/TD]
[TD]Name[/TD]
[TD]Owing [/TD]
[TD]Paid[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]£20.00[/TD]
[TD]£25.00[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[/TR]
[TR]
[TD="colspan: 4"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Select D4:D80 then in Cf > New Rule > Use a formula
And use this formula for green
=D4>C4

and the same for red with
=D4< C4<c4< html=""></c4<>
 
Last edited:
Upvote 0
To apply the Conditional Formatting to a whole range of cells at once, here is the key:
1. Select the whole range you want it applied to first
2. Write the Conditional Formatting as it applies to the very first cell in your select range. If you use the right combination of absolute/relative range references, the range reference will lock/float as needed.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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