How to change the footer only, on multiple worksheets in Excel?

G

Guest

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.
 
J

Jef Gorbach

Pablano C. Pepper said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top