I've copied this into my spreadsheet and changed the page numbers to Sheet2 & Sheet3 (Sheet 2 being Source of the Conditional Formatting and Sheet 3 being the destination) but nothing seems to happen.
Hello David,
Where did you actually place the code?
If you open the VB Editor (Alt + F11), over to the left in the VB Editor, you'll see all your worksheets listed with their actual names in parentheses and the sheet codes, as I have used in the VBA code in my first post, immediately to the left of the sheet names: Sheet1, Sheet2 etc......
Change the sheet codes in the VBA code to suit.
While you're in the Editor, above the sheet list, select Insert then Module. You'll then notice the code field to the right turn white and "Module1" will appear below the sheet list. Paste the code into the white code field then go back to your main sheet, select "Insert" from the ribbon> then "Shapes">select a shape (usually a rectangle type)>click on a spot on your worksheet to place and draw the shape>right click on the shape>select "Assign Macro". An "Assign Macro" dialogue box will appear which will show the subroutine (VBA code) name. Select the name and click OK. The code is now assigned to the shape (the shape is now your button).
Another way to create a button: In the ribbon, select the Developer tab then, in the 'Controls' group, select 'Insert' and click on the drop down arrow. In the Form Controls group, select Button(Form Control) then select a spot on your worksheet where you might like the button to be and create the shape ( the cursor will have turned into a cross-hair which will allow you to draw) to the size you'd like. Assign the VBA code in the same way, as mentioned above for the shape.
Create a copy of your workbook first and do any testing in the copy to ensure you are happy with the results before applying the changes to your actual workbook.
Let us know how it all goes.
Cheerio,
vcoolio.