SOLVED

headers

Copper Contributor

how to insert same header in each page in a workbook

3 Replies

@Fran_Burnard 

1. Go to the menu selection File...Page Setup (fourth from the bottom in the dialog box)

mathetes_0-1628010603427.png

2. In the Page Setup dialog box, select "Header/Footer"

mathetes_1-1628010831456.png

3. Select a header OR create a custom header

 

best response confirmed by allyreckerman (Microsoft)
Solution

@Fran_Burnard 

 

Way 1 (w/out VBA):

You can select multiple worksheets with Ctrl+Left-click. When multiple worksheets are selected, [Group] appears in the title bar at the top of the worksheet. To cancel a selection of multiple worksheets in a workbook, click any unselected worksheet. If no unselected sheet is visible, right-click the tab of a selected sheet, and then click Ungroup Sheets.

Basically, if you select all worksheets and then define the headers via File - Page Setup, this header applies to all worksheets.

 

Way 2 (with VBA)

 

 

Option Explicit
Sub Header_Choice()
Dim sh As Object
For Each sh In ActiveWindow.SelectedSheets
  sh.PageSetup.RightHeader = "NiKoLiNo"
Next
End Sub

 

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote any reply if it helps please, as it will be beneficial to more Community members reading here.

 

@NikolinoDE  Thank you so much...this solved my problem

1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@Fran_Burnard 

 

Way 1 (w/out VBA):

You can select multiple worksheets with Ctrl+Left-click. When multiple worksheets are selected, [Group] appears in the title bar at the top of the worksheet. To cancel a selection of multiple worksheets in a workbook, click any unselected worksheet. If no unselected sheet is visible, right-click the tab of a selected sheet, and then click Ungroup Sheets.

Basically, if you select all worksheets and then define the headers via File - Page Setup, this header applies to all worksheets.

 

Way 2 (with VBA)

 

 

Option Explicit
Sub Header_Choice()
Dim sh As Object
For Each sh In ActiveWindow.SelectedSheets
  sh.PageSetup.RightHeader = "NiKoLiNo"
Next
End Sub

 

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote any reply if it helps please, as it will be beneficial to more Community members reading here.

 

View solution in original post