View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Copy Values From Worksheet to another Worksheet same Workbook

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

"Joe K." wrote:


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