Conditional formatting doesn't move with macro


New Member
Jun 9, 2016
I'm not a whiz at Excel and I asked a friend to write me a macro so I can press a button that moves the previous weeks worth of cells to a sperate tab and then another button so I can move them back to the main tab if need be. All that works fine until I decided to add conditional formatting to the cells on the main tab which changes the colour of each cell depending on what information I choose from the dropdown box. It looks ok and then I press the move a week button and the conditional formatting is all over the place in the separate tab and if I press the button to move it back the conditional formatting formula has jumped a week and remains where it was when I moved forward a week

Any ideas how I can sort this out so that the conditional formatting moves with the macro?
Thank you

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Gerald Higgins

Well-known Member
Mar 26, 2007
Hi, you could add some code to your existing macro so that it sets up the correct Conditional Formating in the area that you move your data TO, and maybe also deletes it from the area you are moving it FROM.

It's difficult to describe exactly how to do this without knowing what CF you want to apply, but you could try using the Marco Recorder while you make these changes manually, and play around with the results.

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics