printing sheet names

S

Shooter

My workbook has 50 worksheets. I would like to set up the footer to display
the sheet name when printed. The 50 worksheets are now in use without this
feature. I have no problem setting this up in "custom footer" for each
individual worksheet. Is it possible to select all worksheets and set this up
once for the entire workbook or do I have to do this one at a time for each
worksheet? Thanks in advance.
 
J

JE McGimpsey

you'd need to use a macro. One way:

Public Sub SheetNameInFooter()
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
With wsSheet
.PageSetup.LeftFooter = .Name
End With
Next wsSheet
End Sub

Substitute .CenterFooter or .RightFooter as desired.

If you're unfamiliar with macros, see David McRitchie's "Getting Started
with Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
P

Peter Ellis

Point to one of the sheet tabs, right click, choose the option select all
sheets from the context menu.

You can alternatively (if you only want a few worksheets selected) click on
one worksheet to select it, then CTRL +Click on another worksheet to select a
second, or Shift+Click on a secoond to select both worksheets along with all
in between them.
 

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