ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel - need an serial # to update everytime sheet is printed. (https://www.excelbanter.com/excel-worksheet-functions/79930-re-excel-need-serial-update-everytime-sheet-printed.html)

C.

Excel - need an serial # to update everytime sheet is printed.
 
Thanks Peo, for the speedy and helpful response. That did the trick!
Cathie

"Peo Sjoblom" wrote:

This will print 100 copies and increment what's in B1 with 1 each time

Option Explicit

Sub PrintIncrement()
Dim i As Integer
For i = 1 To 100
Worksheets("Sheet1").Range("B1").Value =
Worksheets("Sheet1").Range("B1").Value + 1
Worksheets("Sheet1").PrintOut
Next i
End Sub

change name of sheet and cell accordingly, you might want to change the 1 To
100 to something smaller to test print to see if it's what you want


--

Regards,

Peo Sjoblom



"C." wrote in message
...
In an Excel 2003 template, is there any way to have a cell show an ID or
serial number that increases by one everytime the sheet is printed.

For example: I needed 100 copies of a single Excel form with different ID
numbers on each. If I ask to print 100 copies of the form, is there some
way
to have it increment the count? (I'm open to other suggestions on how to
handle this.)
Thanks,
Cathie






All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com