Copy Values From Worksheet to another Worksheet same Workbook

J

Joe K.

I would like to created a macro that will copy the values from Sheet1
worksheet into the Test1 worksheet in the same workbook with format listed
below. Sheet1 the Date field is column B, Cost field is column C, and the
Price field is column F.


Please help me create this macro.

Thanks,




Sheet1
Date(B) Cost(C) Price(F)
08/27/06 5.48 6.89
08/28/06 12.59 10.02
08/29/06 16.24 13.42
....
09/01/07 24.24 30.31


Test1
Column(C) Column(G) Column(F)
08/27/06 5.48 Cost
08/27/06 6.89 Price
08/28/06 12.59 Cost
08/28/06 10.02 Price
08/29/06 16.24 Cost
08/29/06 13.24 Price
....
09/01/07 24.24 Cost
09/01/07 30.31 Price
 
J

Joel

This is pretty simple.

Sub movesheet()

With Sheets("Sheet1")
.Columns("B:B").Copy _
Destination:=Sheets("Test").Columns("C:C")
.Columns("C:C").Copy _
Destination:=Sheets("Test").Columns("G:G")
.Columns("F:F").Copy _
Destination:=Sheets("Test").Columns("F:F")
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top