SOLVED

headers

%3CLINGO-SUB%20id%3D%22lingo-sub-2605923%22%20slang%3D%22en-US%22%3Eheaders%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2605923%22%20slang%3D%22en-US%22%3E%3CP%3Ehow%20to%20insert%20same%20header%20in%20each%20page%20in%20a%20workbook%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2605923%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2606092%22%20slang%3D%22en-US%22%3ERe%3A%20headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2606092%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1119554%22%20target%3D%22_blank%22%3E%40Fran_Burnard%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20Go%20to%20the%20menu%20selection%20File...Page%20Setup%20(fourth%20from%20the%20bottom%20in%20the%20dialog%20box)%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mathetes_0-1628010603427.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F300246i6A7A331A3D1F5254%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mathetes_0-1628010603427.png%22%20alt%3D%22mathetes_0-1628010603427.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E2.%20In%20the%20Page%20Setup%20dialog%20box%2C%20select%20%22Header%2FFooter%22%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mathetes_1-1628010831456.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F300247i955EA320CFD99D11%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mathetes_1-1628010831456.png%22%20alt%3D%22mathetes_1-1628010831456.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E3.%20Select%20a%20header%20OR%20create%20a%20custom%20header%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2606244%22%20slang%3D%22en-US%22%3ERe%3A%20headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2606244%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1119554%22%20target%3D%22_blank%22%3E%40Fran_Burnard%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fheaders-and-footers-in-a-worksheet-cae2a88c-64a7-42ab-96a4-28d2fc16ad31%3Fui%3Den-US%26amp%3Brs%3Den-US%26amp%3Bad%3DUS%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EWay%201%20(w%2Fout%20VBA)%3A%3C%2FA%3E%3C%2FP%3E%3CP%3EYou%20can%20select%20multiple%20worksheets%20with%20Ctrl%2BLeft-click.%20When%20multiple%20worksheets%20are%20selected%2C%20%5BGroup%5D%20appears%20in%20the%20title%20bar%20at%20the%20top%20of%20the%20worksheet.%20To%20cancel%20a%20selection%20of%20multiple%20worksheets%20in%20a%20workbook%2C%20click%20any%20unselected%20worksheet.%20If%20no%20unselected%20sheet%20is%20visible%2C%20right-click%20the%20tab%20of%20a%20selected%20sheet%2C%20and%20then%20click%20Ungroup%20Sheets.%3C%2FP%3E%3CP%3EBasically%2C%20if%20you%20select%20all%20worksheets%20and%20then%20define%20the%20headers%20via%20File%20-%20Page%20Setup%2C%20this%20header%20applies%20to%20all%20worksheets.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWay%202%20(with%20VBA)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EOption%20Explicit%0ASub%20Header_Choice()%0ADim%20sh%20As%20Object%0AFor%20Each%20sh%20In%20ActiveWindow.SelectedSheets%0A%20%20sh.PageSetup.RightHeader%20%3D%20%22NiKoLiNo%22%0ANext%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*%20Kindly%20Mark%20and%20Vote%20any%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20Community%20members%20reading%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2606506%22%20slang%3D%22en-US%22%3ERe%3A%20headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2606506%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40NikolinoDE%3C%2FA%3E%26nbsp%3B%20Thank%20you%20so%20much...this%20solved%20my%20problem%3C%2FP%3E%3C%2FLINGO-BODY%3E
New 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