Excel-Footer Mass change of only Header and not footer

  • Thread starter Thread starter M.Raguram
  • Start date Start date
M

M.Raguram

In Excel, there are 20 worksheets with independent header
and footers defined.

Now I need to change only header en-mass and without
changing the footer. When I try to change the header by
selecting multiple worksheets and change the header, the
footer of the main page gets applicable to all sheets.

Can we change only header at one-go and not the footer.
 
You could change the headers programmatically:

'==================================
Sub ChangeHeader()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws.PageSetup
.LeftHeader = "&D"
.CenterHeader = ""
.RightHeader = "&F"
End With
Next ws
End Sub
'====================================
 
Back
Top