PC Review


Reply
Thread Tools Rate Thread

Copy ActiveWorksheet Columns B,C,F to Another Worksheet in Workboo

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

I would like to copy from the ActiveWorksheet Columns B2,C2,F2 starting at
row 3 until B column row is null to the TEST worksheet. The TEST worksheet
will start at row 2 because of headers the column mappings will correspond to
the list below.


ActiveWorksheet.Column Test.Column
B D
C F
F H

Please help me with this script.

Thanks so much for your help.

 
Reply With Quote
 
 
 
 
Steve Yandl
Guest
Posts: n/a
 
      5th Oct 2007
I think I understand what you want to do. See if the sub below takes care
of it.

_________________________________

Sub TransferColumns()
Dim rngOriginB As Range
Dim rngOriginC As Range
Dim rngOriginF As Range

Dim rowTop As Integer

Application.ScreenUpdating = False

rowTop = Range("B65536").End(xlUp).Row

Set rngOriginB = Range("B3:B" & rowTop)
Set rngOriginC = Range("C3:C" & rowTop)
Set rngOriginF = Range("F3:F" & rowTop)

rngOriginB.Copy
Sheets("Test").Activate
ActiveSheet.Paste (Sheets("Test").Range("D2"))

rngOriginC.Worksheet.Activate
rngOriginC.Copy
Sheets("Test").Activate
ActiveSheet.Paste (Sheets("Test").Range("F2"))

rngOriginF.Worksheet.Activate
rngOriginF.Copy
Sheets("Test").Activate
ActiveSheet.Paste (Sheets("Test").Range("H2"))

Application.ScreenUpdating = True

End Sub

___________________________________

Steve



"Joe K." <Joe K.@discussions.microsoft.com> wrote in message
news:685AEE8B-FF2E-4FBC-8B32-(E-Mail Removed)...
>
> I would like to copy from the ActiveWorksheet Columns B2,C2,F2 starting at
> row 3 until B column row is null to the TEST worksheet. The TEST worksheet
> will start at row 2 because of headers the column mappings will correspond
> to
> the list below.
>
>
> ActiveWorksheet.Column Test.Column
> B D
> C F
> F H
>
> Please help me with this script.
>
> Thanks so much for your help.
>



 
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
Duplicating/Mirror Data into another worksheet within same workboo TJ Microsoft Excel Worksheet Functions 1 6th May 2008 09:39 AM
Moving last info in column of worksheet to another in same workboo =?Utf-8?B?c29kYXQ5Ng==?= Microsoft Excel New Users 6 23rd Nov 2007 11:26 PM
Can columns be hidden accross multiple sheets in an Excel workboo =?Utf-8?B?UmF5IE5heWxvcg==?= Microsoft Excel Worksheet Functions 11 30th Sep 2006 07:38 AM
Copy certain columns from one worksheet to another =?Utf-8?B?RG9ubmEgRGluZ2xl?= Microsoft Excel Misc 2 15th Oct 2005 02:54 PM
How do I copy a worksheet without the link to the original workboo =?Utf-8?B?UmVsaWFiZW5ncg==?= Microsoft Excel Misc 1 31st Aug 2005 01:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:06 AM.