PC Review


Reply
Thread Tools Rate Thread

Copy Values From Worksheet to another Worksheet same Workbook

 
 
=?Utf-8?B?Sm9lIEsu?=
Guest
Posts: n/a
 
      6th Oct 2007

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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      6th Oct 2007
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
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to copy worksheet to new workbook with values only Andrew Microsoft Excel Programming 3 8th Jul 2011 12:11 AM
Copy values of worksheet a to workbook b Nev Microsoft Excel Misc 5 8th Apr 2009 09:35 PM
Copy Values from WorkSheet back to Another Workbook Replacing Values in Worksheet bobwilson Microsoft Excel Programming 0 3rd Apr 2006 09:50 PM
Copy worksheet values and formats into another workbook bishwino Microsoft Excel Programming 0 28th Nov 2005 05:19 PM
Copy worksheet values and formats into another workbook =?Utf-8?B?Umlja19XZW5kdA==?= Microsoft Excel Programming 1 20th Oct 2004 08:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:02 PM.