![]() |
copy non-contu.data into new sheet
i have a created a Invoice in sheet1. Where i have used
vlookup function to lookup values from sheet2. i want to create a Register for all the Invoice which i print. I just want to copy some data from Invoice sheet i.e. Cell a4,d7,e14,a10. (i.e. Date, Name,Ref. no., Amt) When i print a invoice i should ask me do you want to transfer data into sheet3, if yes than it should copy above cell into sheet3 and print the invoice other wise i should print invoice with out copy cell. It should copy new data into next row when new invoice is print. I try to copy data but it goto same row only. the copy is like Sub copydate() Worksheets("Sheet1").Range("A1").Copy _ Destination:=Worksheets("Sheet2").Range("A2") Worksheets("Sheet1").Range("D4").Copy _ Destination:=Worksheets("Sheet2").Range("B2") Worksheets("Sheet1").Range("A10").Copy _ Destination:=Worksheets("Sheet2").Range("C2") Worksheets("Sheet1").Range("E14").Copy _ Destination:=Worksheets("Sheet2").Range("D2") End Sub plz help me to work out this problem. ****al Shah |
copy non-contu.data into new sheet
****al,
try this: (correct for word wrap) Sub copydate() Dim lrow As Long lrow = Sheets("Sheet2").Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).Row Worksheets("Sheet1").Range("A1").Copy _ Destination:=Worksheets("Sheet2").Range("A" & lrow) Worksheets("Sheet1").Range("D4").Copy _ Destination:=Worksheets("Sheet2").Range("B" & low) Worksheets("Sheet1").Range("A10").Copy _ Destination:=Worksheets("Sheet2").Range("C & low) Worksheets("Sheet1").Range("E14").Copy _ Destination:=Worksheets("Sheet2").Range("D & low) End Sub -- sb "****al" wrote in message ... i have a created a Invoice in sheet1. Where i have used vlookup function to lookup values from sheet2. i want to create a Register for all the Invoice which i print. I just want to copy some data from Invoice sheet i.e. Cell a4,d7,e14,a10. (i.e. Date, Name,Ref. no., Amt) When i print a invoice i should ask me do you want to transfer data into sheet3, if yes than it should copy above cell into sheet3 and print the invoice other wise i should print invoice with out copy cell. It should copy new data into next row when new invoice is print. I try to copy data but it goto same row only. the copy is like Sub copydate() Worksheets("Sheet1").Range("A1").Copy _ Destination:=Worksheets("Sheet2").Range("A2") Worksheets("Sheet1").Range("D4").Copy _ Destination:=Worksheets("Sheet2").Range("B2") Worksheets("Sheet1").Range("A10").Copy _ Destination:=Worksheets("Sheet2").Range("C2") Worksheets("Sheet1").Range("E14").Copy _ Destination:=Worksheets("Sheet2").Range("D2") End Sub plz help me to work out this problem. ****al Shah |
All times are GMT +1. The time now is 09:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com