Can Excel add one number to a cell for every page printed?

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

Guest

I have to print my blank Purchase Orders out of Excel. Is there a way to have the P.O. Number add one to it for every page printed? Now I manually change it and print one then change it and print one
 
Hi Wendy

You can use a macro for this

This wil print 5 pages of the activesheet with the pagenumber in A1

Sub test()
Dim a As Integer
For a = 1 To 5
Range("a1").Value = a & " of 5"
ActiveSheet.PrintOut
Next a
End Sub

Or this example that will place the number in the Footer

' From Vasant Nanavati
Sub PrintCopies()
Dim i As Long
For i = 1 To 5
With ActiveSheet
.PageSetup.LeftFooter = i
.PrintOut
End With
Next
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)




Wendy said:
I have to print my blank Purchase Orders out of Excel. Is there a way to have the P.O. Number add one to it for every page
printed? Now I manually change it and print one then change it and print one
 
Back
Top