Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy rows from one Data sheet to another sheet based on cell conte | Excel Discussion (Misc queries) | |||
copy data of two cells from Sheet 2 into one cell in Sheet 1 | Excel Worksheet Functions | |||
Copy/filter data in a sheet from another sheet | Excel Discussion (Misc queries) | |||
How can i copy data from a tabbed working sheet to a summary sheet | Excel Discussion (Misc queries) | |||
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 | Excel Worksheet Functions |