Insert a footer in all sheets
This tutorial shows how to insert a footer in all sheets using Excel and VBA
Select all Sheets >Insert tab > Text group > Header & Footer > Select footer area > Enter footer > Click anywhere on a sheet
1. Select all of the Sheets in the workbook. Note: In this example we have selected all three sheets in a workbook. |
2. Select the Insert tab. |
3. Select the Text group. 4. Click on Header & Footer. |
5. Scroll to the bottom of the page and select the footer area. Note: By default the header will be selected, therefore you will need to scroll to the bottom of the page and select the footer area. In this example we have selected the center footer area. |
6. Enter a footer. 7. Click anywhere on a sheet. Note: In this example we have entered a footer of "Exceldome" in the center header area. |
Sub Insert_footer()
'declare a variable
Dim ws As Worksheet
For Each ws In ThisWorkbook.Sheets
With ws.PageSetup
.LeftFooter= ""
.CenterFooter= "Exceldome"
.RightFooter= ""
.CenterFooter= "Exceldome"
.RightFooter= ""
End With
Next ws
Set ws = Nothing
End Sub
NOTES
Note 1: This VBA code will insert a header of "Exceldome" in the center footer area of all of the worksheets in a workbook where the VBA code is written.
Note 1: This VBA code will insert a header of "Exceldome" in the center footer area of all of the worksheets in a workbook where the VBA code is written.
RELATED TOPICS
Related Topic | Description | Related Topic and Description |
---|---|---|
Insert a header | How to insert a header in a specific sheet | |
Insert a footer | How to insert a footer in a specific sheet | |
Insert a header in all sheets | How to insert a header in all sheets |