VBA Conditional Format Column to the Left Continuously

cjvenables

Board Regular
Joined
Aug 2, 2011
Messages
65
Hello,

Looking for some conditional formatting code that will let me look to see if the values in column B are greater than, less than, or equal to the values in column A. Then, I'd like column C to do the exact same thing with column B, and so on.

The column rows can be dynamic
Less than column is green
Equal to is no fill
Greater than is red

Thanks!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You don't need VBA for this - basic CF formula will do the trick.
Select the entire range of cells to be Conditionally formatted and then create/apply the CF rule as if it only applied to the active cell (just ensure that you do NOT include a $ to anchor the column reference in the formula, and the column references will change relatively in each cell across the page - even though you won't see this happening)
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,490
Members
448,967
Latest member
visheshkotha

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