Macros to Hide / Unhide Columns for Printing

Stonecold300

New Member
Joined
Mar 20, 2018
Messages
1
Hi.

My colleagues are not good with excel, and sadly I am their last hope. I have created spreadsheets that measure the profitability of jobs, and need to lock cells and protect them. I then need to automate the formatting so they cant unlock the sheet by themselves (the macro does it for them , makes the changes and relocks the sheet afterwards). This way they can't break the formulas. This includes hiding rows and columns and then unhiding them again as needed. I can do some of that but the main issue a printing one: I want to print columns A:G as standard and them automatically print the 7 columns next to those, that relate only to the week in review. That could mean hiding week 1 (with 7 columns) to print week 2, and also hiding week 3-26 so that only week 2 appears on the page next to columns A:G. How do I do this with one click?

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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