LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Create invoice from excel worksheet data

Q3PD,

Use code like:

Sub TransferData()
Dim myRow As Long
myRow = Activecell.Row

Sheets("Invoice").Range("A10").Value = Sheets("OrderDetails").Cells(myRow,1).Value
Sheets("Invoice").Range("B23").Value = Sheets("OrderDetails").Cells(myRow,2).Value
Sheets("Invoice").Range("C6").Value = Sheets("OrderDetails").Cells(myRow,3).Value
Sheets("Invoice").Range("E12").Value = Sheets("OrderDetails").Cells(myRow,4).Value
Sheets("Invoice").Range("A19").Value = Sheets("OrderDetails").Cells(myRow,5).Value
'I hope you can see the pattern here....
End Sub

HTH,
Bernie
MS Excel MVP


"q3pd" wrote in message
...
I have a worksheet called 'Invoice' which has many cell references to another
worksheet called 'OrderDetails' in the same workbook. OrderDetails is the
sheet used to store relevant information on each specific order.
I want to be able to select a row on my 'OrderDetails' sheet, then perform
an action (ie: click a button maybe) so that the Invoice sheet takes the cell
references from the higlighted row only.
This will allow me to generate an invoice using the cell references from the
highlighted row only.
I have tried recording a macro that highlights a row then copies the Invoice
sheet and resets the cell references to the higlighted row but this only
works if the row remains the same numbered row.
Can anyone help with any solutions or new ideas?
--
Q3PD



 
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
template creates invoice - how to create summary worksheet? Tony Barratt Excel Discussion (Misc queries) 13 November 25th 11 09:14 PM
How do I move data from Excel worksheet to invoice? D Ruth H Excel Discussion (Misc queries) 1 November 10th 08 09:10 PM
In Excel, print a business invoice from order data in a worksheet billstef Excel Worksheet Functions 0 September 7th 06 04:33 AM
Create invoice from Excel worksheet Pat Flynn Excel Discussion (Misc queries) 3 July 20th 05 01:43 AM
Extracting data from a client worksheet to create an invoice Jacques E. Bouchard Excel Discussion (Misc queries) 1 May 8th 05 07:13 AM


All times are GMT +1. The time now is 10:32 PM.

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"