ascending page numbers for 300 page printout of 1 page?

i have one page i have to print in excel but i need to print 300 copie
and each page needs an ascending number from the previous page.

i.e. the first page should say 1, the second 2, etc.

is there any way to do this without making 300 copy and pastes of th
same sheet for the numbering

--
Message posted from http://www.ExcelForum.com

0
9/15/2004 5:18:26 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
238 Views

Similar Articles

[PageSpeed] 7

Where do you want the copy number to be printed?

If in a header, put something like this in the ThisWorkbook code module 
of your workbook:

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
        Dim vResult As Variant
        Dim i As Long
        Cancel = True
        Do
            vResult = Application.InputBox( _
                    Prompt:="Number of copies:", _
                    Title:="Serialized Print", _
                    Type:=1)
            If vResult = False Then Exit Sub  'user cancelled
        Loop Until CLng(vResult) > 0
        Application.EnableEvents = False
        For i = 1 To vResult
            With ActiveSheet
                .PageSetup.RightHeader = _
                        "Copy #" & Format(i, "000")
                .PrintOut
            End With
        Next i
        Application.EnableEvents = True
    End Sub

if you're not familiar with macros, see

    http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article <Kane3030.1cmx4o@excelforum-nospam.com>,
 Kane3030 <<Kane3030.1cmx4o@excelforum-nospam.com>> wrote:

> i have one page i have to print in excel but i need to print 300 copies
> and each page needs an ascending number from the previous page.
> 
> i.e. the first page should say 1, the second 2, etc.
> 
> is there any way to do this without making 300 copy and pastes of the
> same sheet for the numbering?
0
jemcgimpsey (6723)
9/15/2004 5:34:45 PM
Kane
    One way would be to write a macro with a repeating print command with a 
cell number incrementing with each cycle.  Something like this (untested):
Sub Print300
    Dim RangeToPrint as Range
    Dim c As Long  'Cycle counter
    Set RangeToPrint = 'Define your print range
    For c = 1 To 300
            Range("K50") = c   'The page number cell
            RangeToPrint.PrintOut
    Next
End Sub

HTH   Otto

"Kane3030 >" <<Kane3030.1cmx4o@excelforum-nospam.com> wrote in message 
news:Kane3030.1cmx4o@excelforum-nospam.com...
>i have one page i have to print in excel but i need to print 300 copies
> and each page needs an ascending number from the previous page.
>
> i.e. the first page should say 1, the second 2, etc.
>
> is there any way to do this without making 300 copy and pastes of the
> same sheet for the numbering?
>
>
> ---
> Message posted from http://www.ExcelForum.com/
> 


0
9/15/2004 5:39:16 PM
JE McGimpsey wrote:
> *Where do you want the copy number to be printed?
> 
> If in a header, put something like this in the ThisWorkbook cod
> module
> of your workbook:
> 
> Private Sub Workbook_BeforePrint(Cancel As Boolean)
> Dim vResult As Variant
> Dim i As Long
> Cancel = True
> Do
> vResult = Application.InputBox( _
> Prompt:="Number of copies:", _
> Title:="Serialized Print", _
> Type:=1)
> If vResult = False Then Exit Sub  'user cancelled
> Loop Until CLng(vResult) > 0
> Application.EnableEvents = False
> For i = 1 To vResult
> With ActiveSheet
> .PageSetup.RightHeader = _
> "Copy #" & Format(i, "000")
> .PrintOut
> End With
> Next i
> Application.EnableEvents = True
> End Sub
> 
> if you're not familiar with macros, see
> 
> http://www.mvps.org/dmcritchie/excel/getstarted.htm
> 
> 
> In article <Kane3030.1cmx4o@excelforum-nospam.com>,
> Kane3030 <<Kane3030.1cmx4o@excelforum-nospam.com>> wrote:
> 
> > i have one page i have to print in excel but i need to print 30
> copies
> > and each page needs an ascending number from the previous page.
> >
> > i.e. the first page should say 1, the second 2, etc.
> >
> > is there any way to do this without making 300 copy and pastes o
> the
> > same sheet for the numbering? * 

i had to slightly modify your code but thank you very much! i haven'
touched micros in years and almost forgot you could do things lik
this

--
Message posted from http://www.ExcelForum.com

0
9/15/2004 6:50:53 PM
Reply:

Similar Artilces:

auto number index snafu
I have a 2003 DB I've been adding to for 2 years. It's at 423 records = now. I export to a PDF for simpler searching and viewing. Using the search the other day, I went to grab DVD 186, on carousel tower= 2. And what came up didn't match the record. The index was totally screwed. I went thru all 423 records and created a numeric index by hand. The auto number field is useless. But I would still prefer an auto number field. Trouble is when I create the auto number field, it's still off the actual numbers of the records.. ie: 99-100 is actually 99-186,187, 188, 189 100-385,...

The Sum from 1 worksheet cell to another worksheet cell
the sum from one cell on sheet1 from another cell on sheet2,how do you do the formula qwerty: To sum the value on Sheet1, cell A10 with the cell value Sheet2, cell B20, enter =Sheet1!A10 + Sheet2!B20 (or you can enter '=' sign and click on A10, then enter the plus sign and click on B20) jeff >-----Original Message----- >the sum from one cell on sheet1 from another cell on sheet2,how do you do the formula >. > ...

Sequential ticket numbers and printing 4 to a page
Hi, i have mail merged my numbers from excel into my publisher ticket. Thanks that worked well, now i want to print 4 tickets to an A4 page and in print preview, i get 4 tickets all with the same number on one page. how do i get around this? Many thanks Print preview showing all the same is a bug. Print a test page. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com http://officebeta.iponet.net/en-us/publisher/FX100649111033.aspx "Neyol" <Neyol@discussions.microsoft.com> wrote in message news:90034D4C-9951-4550-9DAC...

Creating a print-macro that'll only print page 1?
Hi, I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort). The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page. Any ideas for this macro? Anders hi, Sub Macro1() Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True End Sub if you don't want a print preview, Preview:=False -- isabelle Le 2011-05-21 04:16, Anders M a �crit : > Hi, > > I have a spreadsheet that contains multiple ...

1 Chart
I presently have an XY line chart showing asset price over time. Pretty simple. X Axis - Time Scale Y Axis - Asset Price I would now like to add an additoinal series showing the volume of assets traded, ideally this would be as a bar chart sitting "underneath" the asset price on the chart. They would share the same X Axis. I have added another series, but this simply displays the volume traded as another line, and even when this is set to a secondary axis the scaling makes this unworkable. i have adjusted the scales of both, still this does not make it workable, i want the series...

Dates in fomula showing as whole number
I have a fomula in a cell that takes the name of a person (from cell 2B), their License number (from another cell 2C)and the Date that License Expires (From cell 2D). The expire date in "2D" is either the word "none" or a date that that persons license needs to be renewed. Those instructors with "None" come out in the calculated field fine, however the ones with dates come back as whole numbers, Example 8/6/10 shows 40396. any help will be appreciated Hi, You need to change the format of that cell or column, highlight the cell or the column, right click o...

Enter "1", cell show ".01". Why?
Any number typed into a cell is divided by 100. If proceded by "=" the number is correct. What caused this and how can I fix it? Try this .. Click Tools > Options > Edit tab Uncheck "Fixed decimal" > OK Things should be back to normal now .. (it's a fixed decimal setting !) -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- "Yonian" <Yonian@discussions.microsoft.com> wrote in message news:40499CA4-7FAF-42A6-8B19-A90881735C50@microsoft.com... > Any number typed into a cell is divided by 100. > If p...

Auto assign Lot Numbers in PO receiving
Hi! Has anyone made a customization to auto assign Lot numbers upon item receipt? My client's lot number is numeric, they want the system to auto assign this. Any ideas? Thanks! -- Marisol Mortera Marisol, Yes indeed, I created one for a client. You probably will not be able to use it as-is because of some client specific functionality but I'm sure you could use this as a stepping stone. The key features were that it would allow for rapid lot number entry by a. Auto-incrementing the lot number - we had Alphanumeric lot numbers so we added a suffix and b. copy the previous lo...

Integrating Great Plains 8.0 and CRM 1.2 and Windows Small Busines
Integrating Great Plains 8.0 and CRM 1.2 I run a Windows Small Business Server 2003 Premium box along with a Windows Server 2003 Standard box used for my Great Plains 8.0 and SQL 2000. I’m considering introducing CRM 1.2 Professional into the mix. From a hardware stand point I know I’m fine all around. I’ve been researching how I should configure CRM and am a bit confused. The info I’ve found in KB887153 states “When you install Microsoft Business Solutions CRM Integrations for Great Plains 7.0, 7.5, or 8.0, Microsoft BizTalk Server is also installed. However, BizTalk Server 2000 and B...

Menu Page
I'd like to make a menu page with buttons to jump between spreadsheets of a workbook. I will turn off the tabs at the bottom in order to do this, but I'm looking for code for my menu buttons to flip to each spreadsheet. Also to return to the menu from a specific spreadsheet, I'd like to use a right click to jump back to the menu. Can someone help me with this. I'm used to programming in MS Access, so programming in MS Excel is a new venture for me. Thanks, PC How about an alternative... Create that index worksheet and put hyperlinks to A1 of each sheet. And then put a hyp...

Detect page change in PropertySheet?
Hi, I have a property sheet that is the parent of several property pages. If the user clicks a tab to change to another page, is there a way I can detect this (and possibly prevent the change) in the PropertySheet dialog? Does windows/MFC send any kind of message to the PropertySheet dialog? I looked at all of the over-rides and WM_ message, but cannot see anything. Thanks! Not directly. You can catch that in the CPropertyPage and relay the message to the CPropertySheet. (I know you are asking, why doesn't the CPropertySheet get the notificatio first? who knows!) AliR. "...

SK 40175 Tuff-1 1/2-Inch Drive 15-Inch Reversible Ratchet
Price:$90.24 Image: http://thediscounfinder.info/image.php?id=B0009U5RRM Best deal: http://thediscounfinder.info/index.php?id=B0009U5RRM Item #: SKT40175. Features & Benefits:Tuff 1(r) Ratchets 72 tooth head design delivers a short 5" stroke for use in tight areas.17 teeth engage when torque is applied to provide a strong grip without slippage.Thumb falls naturally into position, giving instant control with one hand.Easy to reverse, 4 point cap.SuperKrome plating for long tool life and maximum corrosion resistance.Description: 15" Reversible Tuff Customers also search for:...

View as web page in OWA
in OWA 2002, i remember there is a feature "View as web page" on the right side of the email. in OWA 2003, after open the received email, such feature no longer there. Anyway to enable this feature? ...

Ordering by number and text
I use a report to print out checklists that in the detail section have item number to delineate each checklist item. The item numbers as an example are 1-1, 1-2, 1-2a, 1-2b, or 2-1, 2-2, 2-3, 2-3a, 2-3b and so on. The report is grouped by checklist section and the grouping works perfectly but when the report is printed the item numbers are ordered in this order 1-1, 1-10, 1-11, 1-2, 1-3, 1-3a, 1-3b, 1-4, 1-5, 1-6, 1-7, 1-9. Obviously I want the the order to be in proper numerical sequence where 1-10 comes after 1-9. but even replacing the '-' with a decimal point doesn't ...

matching columns of numbers
In EXCEL 2000 for Windows, I have two columns of numbers. Column A has 500 numbers, Column B has 1000 numbers. I need to know which cells in Column A have a match in Column B, and if so, what is the Cell (or row number) in B that matches to that particular cell in A. How can I do this? Thank you for your help. ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** Hi try the following: - insert a new column between A and B (so make B the new C column) enter the following in B1 =IF(ISNA(MATCH...

Zero filling a number field
I have an auto number field that I want to zero fill to six digits but can't figure out how. Any ideas? You don''t say where you're trying to do this, but basically Format(YourAutoNumber, "000000") pdlginternet@aol.com wrote: >I have an auto number field that I want to zero fill to six digits but >can't figure out how. Any ideas? -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200711/1 You can't do that wi...

How do I print only odd pages in Publisher and then only even page
I am attempting duplex printing with a printer that is unable to do duplex printing by printing odd pages first and then flipping the pages over and printing only even pages. No option is given that I can find in the print window. Help! Sarah Wright wrote: > I am attempting duplex printing with a printer that is unable to do > duplex printing by printing odd pages first and then flipping the > pages over and printing only even pages. > > No option is given that I can find in the print window. > > Help! The duplex printing add-in can be found here (http://publisherm...

Force a page break in code
I need to force a page break in the Detail_OnFormat Event when a value changes. How do I do that? Thanks, Bill Bill wrote: > I need to force a page break in the Detail_OnFormat > Event when a value changes. How do I do that? > > Thanks, > Bill Insert a PageBreak control from the ToolBox bar at the desired location. Even though such a control is never "visible" other than in design view they do still have a Visible property. That property effectively turns on and off the PageBreak so you can minipulate that in your code. -- Rick Brandt, Microsoft Access MVP...

Add a blank page separator
How do I add a blank page automatically as a separator after every 15 pages when printing a document of 250 pages? Use a macro containing the following code to print the document: Dim i As Long Dim blank As Document For i = 1 To 240 Step 15 ActiveDocument.PrintOut Range:=wdPrintFromTo, From:=i, To:=i + 15 Set blank = Documents.Add With blank .PrintOut .Close wdDoNotSaveChanges End With Next i -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professio...

How do I change numbers to negative without re-typing?
I have a large range of data that needs to be changed to negative numbers, Can I do this in Excel? ...

Determine number of rows with data
Hi I am using the macro below to pull some data from an external workbook. The 2 issues I need to sort are: 1. The number of rows in the external workbook can vary. How do I amend this code to pull all of the rows with data? 2. The number of rows in the autofill also may vary. How do I autofill only the number of rows required? i.e the number of rows in column A that contain data. 'Lookup Previous Month Sales Columns("K:K").Select Selection.NumberFormat = "General" Range("K4").Select Selection.FormulaArray = _ "=S...

Page break preview & blue line
I using Excel 2003 In page break preview I have always do some thing wrong I'm just pull the blue line by using mouse all page was destroyed It there any tips to return the blue line to the Default pages size setting As far as I know the 'default' print area is all the data, and once you have changed the print area and saved the file you can not get it to go back to the previous setting. If you have problems with this or any other proceedure do try to remember to save your file before you do the awkward bit and then you can go back to the saved copy it it does not work. ...

M2004 Won't Save Customized Toolbars / Home Page
Unable to find anything in archives or the UFAQ on this... My Money 2004 file recently stopped saving customized toolbars / home page. Any changes I make don't "stick". I've used super salvage, which supposedly found and corrected some errors, but the problem persists. Any ideas? Thanks. Try this (and it is in the UFAQ under a less specific topic at http://umpmfaq.info/faqdb.php?q=153). Stop Money Express. Change your toolbar stuff. Exit Money. Restart Money. Restart Money Express. "Sock" <sock@wideopenwest.com> wrote in message news:8205f05b.04101407...

Converting number to text
Is it possible to convert, say 1234 to one thousand two hundred and thirty four Thanks There is no direct functions to convert this. For a VBA solution check out the below links http://www.ozgrid.com/VBA/ValueToWords.htm http://support.microsoft.com/kb/213360 http://www.xldynamic.com/source/xld.xlFAQ0004.html -- Jacob (MVP - Excel) "booshi" wrote: > Is it possible to convert, say 1234 to one thousand two hundred and thirty > four > > > Thanks > > > . > ...

Sequentially number lines automatically
Version: v.X Operating System: Mac OS X 10.5 (Leopard) Processor: Intel How can automatically number the lines as I enter data. <br><br>so box A1 would automatically be 1 <br> and the next time I created an entry on another line that line would be 2, etc. <br><br>The reason is so that I can sort, delete and the numbers will remain, so I can also go back to the order than things were entered into. <br><br>Could do this manually, but a pain. <br><br>Or could possibly do this with a date and time? <br><br>Thanks Steevee Se...