Results 1 to 4 of 4

Thread: Need automatic serial no in different pages

  1. #1
    Seeker arup1032's Avatar
    Join Date
    Sep 2015
    Posts
    19
    Articles
    0
    Excel Version
    Excel 2013

    Need automatic serial no in different pages



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I want to print several pages where I need to set up serial no column. I want it happen by automatic. Like :

    I have selected specific print area and I want to get print each time with automatic serial no such as 1st page will be printed with serial 1-20 and the second page will be printed with serial 21-40 as like the third one will have 41-60 serial no.

    Please send your answer asap.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	untitled.jpg 
Views:	55 
Size:	85.9 KB 
ID:	4023  
    Last edited by arup1032; 2015-10-15 at 01:05 PM.

  2. #2
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,512
    Articles
    0
    Excel Version
    365
    try:
    Code:
    Sub blah()
    myCount = 20 'the number of rows of serial numbers
    StartSerial = 1 'the first serial number
    EndSerial = 299 'the last serial number (though it will print more to fill the last page)
    Set TopCell = Range("C3") 'topmost cell of serial numbers
    
    TopCell.Offset(1).Resize(myCount - 1).FormulaR1C1 = "=R[-1]C+1"
    For i = StartSerial To EndSerial Step myCount
      Range("C3").Value = i
      ActiveSheet.PrintPreview  'use Print instead
    Next i
    End Sub

  3. #3
    Seeker arup1032's Avatar
    Join Date
    Sep 2015
    Posts
    19
    Articles
    0
    Excel Version
    Excel 2013
    Thanks for you essential reply. It will helps me much. But would you like to help me more. I want to print all multiple copy at once. Like I will print 100 page and give the direction to printer at once. May be I will insert 100 in "number of copies" in print option. So what is the procedure to print 100 copies with different serial no.

    Note: By your vb code I need to give print instruction for every single page.

  4. #4
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,512
    Articles
    0
    Excel Version
    365
    use:
    ActiveSheet.Printout
    instead of:
    ActiveSheet.PrintPreview

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •