What should be the VBA code for Auto fit Excel Columns and Print tiles and making Border ?

Jyotirmaya

Board Regular
Joined
Dec 2, 2015
Messages
199
I have 27 sheets in my Excel file, One sheet is RAW DATA and other sheet is COUNT, I want a macro code for other 25 sheets.
1. I want the column width size - column A =17 Column B = 30 Column C = 15 Column D = 12 Column E Auto Fit Column F = 25 Column G = 7 Column H = 10
2. If the page is more than 2 then Print Tiles - rows to repeat at top is 1st row A1 to H1.
3. And dark line Borders Inside and outside each cell where the Data available till the last row, I have data in all sheets from A to H.

Kindly help with the code
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,043
Messages
5,767,797
Members
425,436
Latest member
MSPaperclipMan

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
Top