Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Display page number in footer based upon pages in the current tab

One way, using a macro:

To print all sheets in the workbook:

Public Sub PrintAllPages()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
With ws.PageSetup
.CenterFooter = "Page " & ws.Index & "." & "&p"
End With
ws.PrintOut
Next ws
End Sub

or, to print only those sheets that you've selected:

Public Sub PrintSelectedSheetPages()
Dim ws As Worksheet
For Each ws In ActiveWindow.SelectedSheets
With ws.PageSetup
.CenterFooter = "Page " & ws.Index & "." & "&p"
End With
ws.PrintOut
Next ws
End Sub



In article ,
Ben Fochs <Ben wrote:

I have a very large file which has over thirty tabs with multiple pages for
each tab and I deperately need to modify the footer to display the page
numbers in the following manner. . .

Tab 1 - Page 1.1, 1.2, 1.3, 1.4, etc.
Tab 2 - Page 2.1, 2.2, 2.3, 2.4, etc.
Tab 3 - Page 3.1, 3.2, 3.3, 3.4, etc.
. . . etc.

However, as listed below, I am only able to use the TOTAL page numbers for
the second digit. . .

Tab 1 - Page 1.1, 1.2, 1.3, 1.4
Tab 2 - Page 2.5, 2.6, 2.7, 2.8
Tab 3 - Page 3.9, 3.10, 3.11, 3.12
. . . etc.

This is requiring me to print every page individually which is probably
adding about two to three hours of manual work on a monthly basis, so any
help would be GREATLY appreciated.

Thanks!
Ben

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display current page number in any cell of that page. Laljeet Excel Discussion (Misc queries) 8 February 2nd 08 01:31 AM
Need page number & total pages in worksheet - not header or footer vonzott Excel Worksheet Functions 1 March 30th 07 08:34 PM
How to display current page # in any cel , not header & footer Tpeila Excel Discussion (Misc queries) 0 February 7th 07 09:15 PM
Number of Pages in Footer Ed Excel Discussion (Misc queries) 7 October 7th 06 05:53 PM
header/footer "page 1 of 'x' pages" FloBuddyDog Excel Discussion (Misc queries) 1 August 2nd 05 08:35 PM


All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"