Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

excel help macro?

Options
  • 04-01-2005 10:23pm
    #1
    Closed Accounts Posts: 244 ✭✭


    hi,

    sorry if this is in the wrong section...

    i have an excel spreadsheet with which i want to print say 100 copies with a different number on top as header ranging from 0-100

    i dont want to have to print them individually as i have a lot of different numbers and letter ranges to go on top.

    i just need to print something and have a track of each sheet by the numbers/letters on top.

    how can i print them where it will automatically print a number range in a cell/cells for me???? can i do this in excel???


    any help much appreciated!!!


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    If I'm getting you correctly then you want to print out N amount of copies of a spreadsheet. Each copy will be numbered so the 28th sheet printed will be numbered 28. It also sounds like you need some other information to identify each sheet like an invoice number of something. Is this correct? If so you can do this in excel and its quite easy. Let me know ...


  • Closed Accounts Posts: 244 ✭✭confetti


    yeah thats right i want to print out order forms and hand them out so that each one will have a unique number on it,

    i want different sets say,

    purch 00
    purch 01
    ....
    purch 100

    so yeah it would be something similiar to an invoice number printed on the top,

    so how easy is that???

    thanks


  • Closed Accounts Posts: 244 ✭✭confetti


    anyone else know how its done????


    Please!!!


  • Closed Accounts Posts: 58 ✭✭sillild


    Why dont you pre-print 100 pages with just the P/O number on the top, Then reload the paper into the printer


  • Registered Users Posts: 7,606 ✭✭✭Jumpy


    sillild wrote:
    Why dont you pre-print 100 pages with just the P/O number on the top, Then reload the paper into the printer

    What would you use to generate the number then?


  • Advertisement
  • Closed Accounts Posts: 58 ✭✭sillild


    Splash out and buy a decent system cheap arse


  • Closed Accounts Posts: 133 ✭✭Jim Kernsey


    Copy this sub into your macros.

    Its a rushed answer, but its fairly intuative
    It prints to the default printer


    Sub Print_sheets()
    '
    ' Print_sheets Macro
    ' Macro recorded 11/01/2005 by JK @ Boards.ie
    '

    '
    Dim amount_of_copies As Integer
    Dim number_to_start_at As Integer
    Dim column As String
    Dim i As Integer

    number_to_start_at = 0 ' set this to your starting position
    amount_of_copies = 100 ' how many copies do ypu want
    column = "C2" ' where you want the number displayed

    i = number_to_start_at

    Do While i < amount_of_copies
    Range(column).Select
    ActiveCell.Value = i

    ' This line will print out every record
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

    If i = 0 Then
    i = 1
    Else
    i = i + 1
    End If

    Loop



    End Sub

    good luck with it


Advertisement