ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to change the footer only, on multiple worksheets in Excel? (https://www.excelbanter.com/excel-worksheet-functions/37776-how-change-footer-only-multiple-worksheets-excel.html)

Pablano C. Pepper

How to change the footer only, on multiple worksheets in Excel?
 
When selecting multiple worksheets I would like to change the footer without
affecting the header. I have a inventory workbook that I update monthly. I
have the current month in the footer, but the headers are different for each
worksheet.
Currently I can only change the footers one worksheet at a time. My
workbooks contain 25+ worksheets, so changing the footers one at a time is
not fun.

Jef Gorbach


"Pablano C. Pepper" <Pablano C. wrote in
message ...
When selecting multiple worksheets I would like to change the footer

without
affecting the header. I have a inventory workbook that I update monthly.

I
have the current month in the footer, but the headers are different for

each
worksheet.
Currently I can only change the footers one worksheet at a time. My
workbooks contain 25+ worksheets, so changing the footers one at a time is
not fun.


Correct the header/footer values to reflect your needs.

Sub title_pages()
a$ = InputBox("These reports are for what month?") 'get user input
For i = 1 To Sheets.Count
Sheets(i).select
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "Company Name" & Chr(10) & "&A" & Chr(10) & a$
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "Page &P of &N"
.RightFooter = ""
End With
Next i
End Sub





All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com