Page Layout

asjmoron

Board Regular
Joined
Apr 26, 2016
Messages
98
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,

Someone (who is defo not me) has managed to resize every column on every single sheet in the workbook i took an age to build.

Is there a way I can copy a master layout to the all of the sheets without effecting the data that is already on each sheet?

massively great full for any help!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Panic over, I managed to vba it after a bit of trial and error
 
Upvote 0
If anyone out there is interested....


  1. I wrote a simple macro to copy the correct layout's 1:1
  2. The macro then moved to the next sheet and pasted the row with widths being maintained
  3. Then I just looped that process over the whole workbook

Worked a charm :)


Sub fixit()
'
Rows("1:1").Select
Application.CutCopyMode = False
Selection.Copy
Worksheets(ActiveSheet.Index + 1).Select


Rows("1:1").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.Goto Reference:="R1C1"


End Sub

________________________________________________________________________

Sub LoopMacro()

Dim x As Integer

For x = 1 To 200
Call fixit
Next x

End Sub
 
Upvote 0
I would copy the Entire Master Sheet.
Then Select ALL the other sheets and do the paste Special.ColumnWidths.

Not exactly the same case as you, but it hasn't been much to slow me down using my method. Just a monthly need that updates 60 to 70 sheets and haven't seen much need to macro the method.
 
Upvote 0
I did try this but it overwrote the data that was already in the cells....unless I did it wrong?
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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