PDA

View Full Version : Help with consolidating Invoices



Factor3
02-10-2007, 10:51 AM
Goal:
I am trying to take a formatted template (the invoice template), and copy specific fields:
1) Date (?I15?)
2) Customer Name (?E15?)
3) Services Rendered (?I16?)
3) Amount Due (?I45?)
4) Amount Paid (?I47?)
5) Invoice Number (?I18?)
I would like to then take these values, and paste them to an aggregate spreadsheet that keeps the tally?s of all invoice summaries (called "Invoice Summary Page.xls") in a Row format (i.e. Transpose them [I think] into a horizontal row).

Issues:
1) Because these cells that are being selected (Goals 1:5) are not a range, Excel will not let me copy them together. For instance, using the code:
Range("E15,H15,I45,I47").Select
Selection.Copy
I get an error message saying, ?That command cannot be used on multiple selection
1) I want the program to be able to see if there are already values in a given row (i.e. other invoice information from when the Macro was run before), and if there is, add it to the next blank row down.
2) In case I run the Macro on an invoice I have already put into the ?Invoice Summary Page?, I want the Macro to scan and see if the Invoice Number Cell (?I18?) has already been used in the Summary Spreadsheet. If it has, then the information should not be transferred into the new sheet (maybe a message like, "that invoice has already been added" or something like that). If it hasn?t, then follow the protocol in Issue #1:

Any help is greatly appreciated (I'm a serious newby as you can tell).

lucas
02-10-2007, 11:51 AM
Here's an example that does what your looking for. It also copies the invoice sheet to the end of the line and numbers it. Thanks to Johnske as it's the one that I use.

lucas
02-10-2007, 11:52 AM
Look for the nav button on the left side of the page for navigating between sheets after you have about a hundred it becomes useful