Changing the order of page numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Example: On a 10 page doc.
you want the first 5 pages to be numbered '1' to '5'
then the next 5 pages to be numbered '14' to '18'

Is there a way of changing page numbers like the above example?

Thanks!
Ben
 
Ben

Don't understand why you want to do this but the best way is to record a
macro while you do it manually.

1. print pages 1 to 5
2. go into page setup and change the first page from auto to the value 9
3. print pages 6 to 10. The page count should start at 14.
4 go into page set up and change the first page back to auto.

you'll get something like this:

Sub Macro2()
ActiveWindow.SelectedSheets.PrintPreview

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "page &P of &N"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.748031496062992)
.RightMargin = Application.InchesToPoints(0.748031496062992)
.TopMargin = Application.InchesToPoints(0.984251968503937)
.BottomMargin = Application.InchesToPoints(0.984251968503937)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = 14 ' <<<<
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With

ActiveWindow.SelectedSheets.PrintPreview
End Sub

you can eliminate most of the default values which will make it quicker.

I'm afraid I've not tested this as I haven't got the paper to spare.

Regards

Trevor
 
Ben,

Excel does not perform like Word in this regard.

You will either have to manually insert some blank pages if using an
automated footer for the page numbers, then print only the pages with
text, or
Set up a cell on each page that is the desired page number, and remove
the page number form the worksheet header/footer.
 
Back
Top