Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default printing invoices using excel

Does anyone know if you can print invoices using line item information in an
excel spreadsheet. I have it already to go, in invoice format, using the
info in another excel spreadsheet, but can't figure out how to make it print
and advance to each record...Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,365
Default printing invoices using excel

You're going to need some VB code (a macro) to do this. What needs to happen
in the code is that it starts looking at the sheet with the line item
information and picks up the information in each row in turn, placing that
into the proper locations on the invoice and then printing that sheet. That
would all be done within a loop in the macro.

Now what could make it very easy to code would be if some unique piece of
each invoice's information were in the leftmost column of the table sheet.
Then you could use a VLOOKUP() formula on the invoice sheet for all
information except that one unique item. Your loop would simply pick up the
one unique item and place it into the appropriate location on the invoice
sheet and the VLOOKUP() functions would automatically pickup all the other
data.

Skeleton for such code - you'd need to change things like the names of the
sheets involved and the column/cell references to reflect your reality:
Sub PrintAllInvoices()
Dim lastRow as Long
dim rowPointer as Long
'choose the column with the unique data item in it for this
lastRow = Worksheets("datasheetname").range("A65536").End(xl Up).row
'choose the cell with the first unique item in it
Worksheets("datasheetname").Range("A2").Select
'here the "+ 2" is based on row selected in previous statement
Do Until rowPointer + 2 lastRow
'move one piece of info from data sheet to invoice sheet
Worksheets("invoicesheet").Range("X9") = _
ActiveCell.Offset(rowPointer,0)
'either do more moves of information using
'variations with the .Offset parameter to choose info from
'other columns, or use VLOOKUP() on the invoice sheet to
'automatically grab related data from the datasheet
'then finally print the invoice
Worksheets("invoicesheet").Printout Copies:=1
rowPointer = rowPointer + 1
Loop
End Sub

"stuck in So Cal" wrote:

Does anyone know if you can print invoices using line item information in an
excel spreadsheet. I have it already to go, in invoice format, using the
info in another excel spreadsheet, but can't figure out how to make it print
and advance to each record...Any ideas?

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
Address in Excel invoices Not Just Talking Excel Discussion (Misc queries) 2 May 10th 07 03:42 PM
On Excel Invoices it gives an invoice number-can be seq #'d??? Hinglesby Excel Discussion (Misc queries) 3 February 16th 07 11:07 PM
Printing invoices Telephoneman Excel Worksheet Functions 0 August 15th 06 08:24 PM
creating many invoices with excel data creating many invoices from excel data Excel Discussion (Misc queries) 1 May 2nd 05 03:48 AM
Create invoices from excel workbook KJH Excel Worksheet Functions 5 December 22nd 04 02:21 PM


All times are GMT +1. The time now is 07:22 AM.

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

About Us

"It's about Microsoft Excel"