Is there a way to establish and apply a default Page Layout

Patikns23

New Member
Joined
Sep 21, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Is there a way that I can establish a default Page Layout for all Excel worksheets and apply that to all of the worksheets that I open in Excel?

For example, I export A LOT of csv files from Great Plains. Currently, I have to change the page setup on each and every one. It would be nice to have that done automatically.

.5" Top, Left, Right margins
.75" Bottom margin
Foot at .3"
Left footer: File Path
Right footer: Date and Time
Fit to 1 page portrait, letter size
Center horizontally

Thank you.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
If I understand your need you could format a worksheet as needed, name it Template then hide it. by right clicking on the worksheet tab then select Hide. When you need a new worksheet you make a copy of the Template sheet. The macro below does that, if the sheet is named Template.

I suggest assigning a "Hot Key" to the macro so you can run the macro that way. Maybe Ctrl N which normally creates a new workbook but for you would create the new worksheet in the existing workbook.

I found this web page that shows how to do that. 2 Ways to Assign Keyboard Shortcuts to Macros - Excel Campus

Here is the macro that makes a copy of the template worksheet.

VBA Code:
Sub MakeSheetFromTemplate()

    Dim iWorksheetsCount As Long
    
    iWorksheetsCount = ThisWorkbook.Worksheets.Count

    With Worksheets("Template")
        .Visible = True
        .Copy Before:=Sheets(1)
        .Visible = False
    End With
    
    ActiveSheet.Name = "Sheet" & iWorksheetsCount + 1
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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