[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

kassie

12/12/2006 2:51:00 PM

With the target worksheet active,

Sub tryit()
Workbooks("Book1").Worksheets("Sheet1").Range("A:A").Copy
ActiveSheet.Range("A:A")
Workbooks("Book1").Worksheets("Sheet1").Range("B:B").Copy
ActiveSheet.Range("D:D")
Workbooks("Book1").Worksheets("Sheet1").Range("C:C").Copy
ActiveSheet.Range("G:G")
End Sub
--
Hth

Kassie Kasselman


"RSteph" wrote:

> Is there a quick and dirty way to copy an entire column from one worksheet,
> and paste it into another (with a macro). For example I have a worksheet with
> three columns. I'd like to paste column A of that worksheet into column A of
> another, then column B into column D, and column C into column G.
>
> As of now I'm using a for loop to run through the first worksheet, and then
> doing a simple Cell("").Value = worksheet.Cell("").Value type of deal; but I
> was curious if there was a simpler way to handle this: Some sort of
> 'worksheet(1).Columns("B").CopyTo(Worksheet(2).Columns("D")' - Something
> simple like that??
>
> Is there and easier/more effecient way to handle this than to use a For Loop?