View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chrissy[_4_] Chrissy[_4_] is offline
external usenet poster
 
Posts: 101
Default Need Help with Code - Copy & Paste

Why do you want to copy it one cell at a time?

It is noticeably faster to do it the way John suggested.

What do you want to do in the source sheet if there is
not value? Skip that cell or copy it anyway? If you want
to skip it then what do you want to do with that cell on the
destination sheet? Leave it the way it was or clear the
contents of it? If you want to clear the contents of it
then you are saying that Col A in both sheets will have the
same data in them at the end - so it would be faster to
copy the whole column.

Chrissy.


JStone0218 wrote
John,

I'm looking to copy & paste cell A1, A2, A3... from Worksheet2 through the last
active cell in column A, to Worksheet1, cell A1, one record at a time.

Worksheet1, A1 is the data input range for a dynamic web query.

I appreciate your help.

Donnie


If your intention is to copy the contents of the A column in Sheet2 to the A
column in Sheet1 you could use:

Worksheets("Sheet2").Range("A:A").Copy _
Destination:=Worksheets("Sheet1").Range("A1")

John Green - Excel MVP
Sydney
Australia


Sub Macro1()

Sheets("Sheet2").Select
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Range("A3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Range("A4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Range("A5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste

End Sub