Is it possible to create a macro for conditional formatting?

Retired-071445

New Member
Joined
Jun 18, 2011
Messages
2
I track student progress across their school years for a number year groups. So each student will have scores entered across 12 columns. I use conditional formatting to colour the background of the current year results comparing scores on start of year to current term. I use c formatting with the following code for eg = AND($D7>$A7 +3) turn cells green; = AND($D7=$A7 +3) turn cells orange and = AND($D7<$A7 +3) turn red. I then use format painter to copy to the rows below. However when different columns are involved I have to repeat this process. Is there a means of speeding this up? Any help appreciated.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Try selecting the entire range then enter the CF referring to the top left cell in the selection.
 
Upvote 0
When I do that it does not formatt correctly. I need the three selected cells to colour the same background colour based on the values of say column d and a. When I select the entire range the formatting does not work but when I do it on the first row of the range and copy down with painter, it does. However it is tedious to repeat this for each year group in the school.
 
Upvote 0

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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