+ Reply to Thread
Results 1 to 2 of 2

Generating Invoices

  1. #1
    Registered User
    Join Date
    02-17-2013
    Location
    Paris, FR
    MS-Off Ver
    Excel 2010
    Posts
    1

    Generating Invoices

    Hi,
    I am "starting" to use the macros and I need some help to make it recursive.
    Basically I have a first spread sheet with the following columns
    A: Issue Date, B: Client Name, C: Object, D: Amount Invoiced, E: Invoice Ref., F: Address, G: ZIP and City
    The second sheet is the invoice template and I need to generate as many invoices as there is lines in the data source spread sheet.
    I created a macro with which I can only generate 1 invoice at a time:
    Sheets("SHEET NAME").Select
    Sheets("SHEET NAME").Copy After:=Sheets(PREVIOUS SHEET #)
    ActiveWindow.SmallScroll Down:=-3
    Range("D11").Select
    ActiveCell.FormulaR1C1 = "='[DATA-SOURCE.xlsx]Loyers'!R2C5"
    Range("G11").Select
    ActiveCell.FormulaR1C1 = "='[DATA-SOURCE.xlsx]Loyers'!R2C1"
    Range("D15").Select
    ActiveCell.FormulaR1C1 = "='[DATA-SOURCE.xlsx]Loyers'!R2C2"
    Range("B16:E16").Select
    ActiveCell.FormulaR1C1 = "=''[DATA-SOURCE.xlsx]Loyers'!R2C6"
    Range("B17:E17").Select
    ActiveCell.FormulaR1C1 = "=''[DATA-SOURCE.xlsx]Loyers'!R2C7"
    Range("B18:E18").Select
    ActiveWindow.SmallScroll Down:=6
    Range("D37:E37").Select
    ActiveCell.FormulaR1C1 = "='[DATA-SOURCE.xlsx]Loyers'!R2C4"
    Range("D38:E38").Select
    ActiveWindow.SmallScroll Down:=3
    Sheets("SHEET NAME (2)").Select
    Sheets("SHEET NAME").Name = "SHEET NEXT NAME"
    Range("F43").Select

    Also, the sheets are named the invoice reference (Row E in the data file)

    It would be great if anyone could give me some advice as this will save me a LOT of time.

    Thanks in advance,

    Ben

  2. #2
    Valued Forum Contributor Dunc3142's Avatar
    Join Date
    09-05-2007
    Location
    Franklin OH
    MS-Off Ver
    2000 and 2007 and 2010 @ Home & Teach 2010
    Posts
    351

    Re: Generating Invoices

    I created this for someone else on this board but it will start you in the right direction. if you post an example with fake data I can help more.
    Attached Files Attached Files
    Yes it will. we just have to figure out how...
    If I have helped you, PLEASE click the * and add to my Rep.
    Also, if the problem is SOLVED please mark it as so.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1