Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Copy ActiveWorksheet Columns B,C,F to Another Worksheet in Workboo


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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Copy ActiveWorksheet Columns B,C,F to Another Worksheet in Workboo

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 wrote in message
...

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard Shortcut to toggle b/w Find and Replace and ActiveWorksheet? Brooks Excel Discussion (Misc queries) 0 November 25th 08 02:20 PM
How can I copy the header and footers onto every page on a workboo Lesley Shand Excel Worksheet Functions 1 September 1st 07 03:34 PM
Can columns be hidden accross multiple sheets in an Excel workboo Ray Naylor Excel Worksheet Functions 11 September 30th 06 07:38 AM
Macro question - Need to copy data & formatting to another workboo Rog Excel Programming 3 July 27th 06 04:00 PM
How do I copy a worksheet without the link to the original workboo Reliabengr Excel Discussion (Misc queries) 1 August 31st 05 01:17 AM


All times are GMT +1. The time now is 03:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"