#1   Report Post  
Posted to microsoft.public.excel.misc
momotaro
 
Posts: n/a
Default Number

Is there a way to increment a number in my spreadsheet each time I print?
Thanks in advance.

momo
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default Number

From previus post:

ThisWorksheet module

Private Sub Workbook_Open()
Range("Sheet1!G1") = Range("Sheet1!G1") + 1
End Sub

You may want to read J.E. McGimpsey's notes:
http://mcgimpsey.com/excel/udfs/sequentialnums.html

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"momotaro" wrote in message
...
Is there a way to increment a number in my spreadsheet each time I print?
Thanks in advance.

momo



  #3   Report Post  
Posted to microsoft.public.excel.misc
momotaro
 
Posts: n/a
Default Number

Thanks for the info. Can the number be changed after I printed? For
example, I input info on the sheet and click print. After I click print, I
want the number increase to the next number. Can it be done? Thanks again.

"Bernard Liengme" wrote:

From previus post:

ThisWorksheet module

Private Sub Workbook_Open()
Range("Sheet1!G1") = Range("Sheet1!G1") + 1
End Sub

You may want to read J.E. McGimpsey's notes:
http://mcgimpsey.com/excel/udfs/sequentialnums.html

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"momotaro" wrote in message
...
Is there a way to increment a number in my spreadsheet each time I print?
Thanks in advance.

momo




  #4   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme
 
Posts: n/a
Default Number

Use this workbook sub
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("Sheet2!A29") = Range("Sheet2!A29") + 1
End Sub
Note it updates BEFORE printing
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"momotaro" wrote in message
...
Thanks for the info. Can the number be changed after I printed? For
example, I input info on the sheet and click print. After I click print,
I
want the number increase to the next number. Can it be done? Thanks
again.

"Bernard Liengme" wrote:

From previus post:

ThisWorksheet module

Private Sub Workbook_Open()
Range("Sheet1!G1") = Range("Sheet1!G1") + 1
End Sub

You may want to read J.E. McGimpsey's notes:
http://mcgimpsey.com/excel/udfs/sequentialnums.html

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"momotaro" wrote in message
...
Is there a way to increment a number in my spreadsheet each time I
print?
Thanks in advance.

momo






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
Excell-How to add the number of cells containing text? = a sum aruba64taw Excel Worksheet Functions 2 December 21st 05 09:51 AM
Generating (in a random order)each number once from a given number Neil Goldwasser Excel Worksheet Functions 2 December 2nd 05 11:27 PM
Change number format from text to number? Scot New Users to Excel 2 December 1st 05 04:15 PM
vlookup with more than number to be retrieved martelie Excel Worksheet Functions 3 October 14th 05 12:50 PM
Count Number of Characters in a cell? AHJuncti Excel Discussion (Misc queries) 2 June 16th 05 07:39 PM


All times are GMT +1. The time now is 08:28 AM.

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

About Us

"It's about Microsoft Excel"