#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Macro Help

I have two spread sheets. One called "Lot" the other called "Invoice"

Lot contains all of the billing information for each location.

Store, City, State, Invoice Number, Billing Amount, Sales Tax, Total

I need to compile this data onto the "Invoice" spreadsheet, and print
individual invoices for each store. I figure I will use Vlookup for
everything but the store number, and possibly have a macro input the
store numbers.

Is there a way that I can record a macro to copy the store number
(starting in A7) to the invoice spreadsheet, and have it print....then
copy the data in A8, print...copy A9, print so on and so on, until
there is no more data in A.

Any help you can provide would be great.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default Macro Help

I based my solution upon indexing all variable fields in Invoice sheet upon
a named value ("InvoiceIndex")
The PrintInvoices macro varies that value from 7 to last invoice row.

See example: http://cjoint.com/?fEr6sH1M6Y

hth
--
AP

'-----------------------------------
Sub PrintInvoices()
Dim lLastRow As Long
Dim iRow As Long

lLastRow = Worksheets("Lot").Range("A7").End(xlDown).Row

For iRow = 7 To lLastRow
Names("InvoiceIndex").RefersTo = iRow
Worksheets("Invoice").PrintOut
Next iRow
End Sub
'-------------------------------------
"ChuckF" a écrit dans le message de news:
...
I have two spread sheets. One called "Lot" the other called "Invoice"

Lot contains all of the billing information for each location.

Store, City, State, Invoice Number, Billing Amount, Sales Tax, Total

I need to compile this data onto the "Invoice" spreadsheet, and print
individual invoices for each store. I figure I will use Vlookup for
everything but the store number, and possibly have a macro input the
store numbers.

Is there a way that I can record a macro to copy the store number
(starting in A7) to the invoice spreadsheet, and have it print....then
copy the data in A8, print...copy A9, print so on and so on, until
there is no more data in A.

Any help you can provide would be great.

Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"