Custom page footers

RichardMGreen

Well-known Member
Joined
Feb 20, 2006
Messages
2,177
Hi all

I want to add a custom cell footer to several tabs in a worksheet and I need it to be the contents of a cell.

I've found some code to add the footer to the bottom of the active sheet but I wondered if it was possible to add it to the entire workbook with doing each sheet individually.

The code I've found is here:-
Code:
ActiveSheet.PageSetup.LeftHeader = "Data Extraction Date " & Sheets("Query_List").Range("H18").Value
(I've updated it to reference the cell I want).

So, is it possible to apply this to an entire workbook at once?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
No, footer is sheet-specific. If you wanna add same footer to all sheets, you are to iterate through each sheet.
 
Upvote 0
Actually, I found a way to do it:
Code:
    Sheets(Array("x", "y", "z").Select
    Sheets("x").Activate
    With ActiveSheet.PageSetup

        .CenterHeader = "some stuff to all"

    End With
End Sub

So: group all of the sheets that you want to apply your header to and then do page set up.

HTH
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top