+ Reply to Thread
Results 1 to 3 of 3

Cap an invoice with a footer after a variable number of records

  1. #1
    Registered User
    Join Date
    05-25-2010
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    3

    Post Cap an invoice with a footer after a variable number of records

    I have created a macro to populate an invoice with data. The number of rows of data is variable. I need to cap the bottom of the invoice with a footer that contains a formula for column totals and the final price. Attached is the sample invoice.
    I need help with the code to create X number of rows containing formulas to perform on the inputted data, and to cut bottom portion footer of the invoice from the side of the sheet and paste it after the last record from within the invoice, maintaining that the number of records within the invoice will be variable. Alternatively I might not need to cut and paste the footer but just have the macro generate it at the bottom.
    Both the individual rows within the invoice contain SUM formulas as well as the footer rows. Cell formatting is important too as some cells are currency, dates, and numerics, and some have borders.
    Any help with this would be greatly appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Cap an invoice with a footer after a variable number of records

    You could instead leave enough space for the longest invoice, put the footer at the bottom, and hide unneeded rows before printing.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Cap an invoice with a footer after a variable number of records

    Hi shevy

    Try this code (in attached workbook). It appears to do as you described.
    Please Login or Register  to view this content.
    Let me know of issues.
    John
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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