Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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
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
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
copy data of two cells from Sheet 2 into one cell in Sheet 1 cahabbinga Excel Worksheet Functions 6 January 30th 08 01:00 PM
Copy/filter data in a sheet from another sheet Sheikh Saadi Excel Discussion (Misc queries) 1 November 22nd 07 08:28 AM
How can i copy data from a tabbed working sheet to a summary sheet StephenF Excel Discussion (Misc queries) 1 March 15th 07 03:40 PM
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 parag Excel Worksheet Functions 3 June 15th 06 10:29 PM


All times are GMT +1. The time now is 12:35 PM.

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

About Us

"It's about Microsoft Excel"