Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 86
Default Copying across columns

Hi,

I have the following sample code which keeps creating an error, please can
you tell me whats wrong? the columns to copy need to be in that order.

With oldbk.Sheets(2)

..Columns("H:H,T:T,AK:AK,G:G,AJ:AJ,D:D,AM:AM,AP:AP ,AS:AS,AU:AU,AQ:AQ").Copy
Destination:= _
NewbkS2.Range("A1")
End With

thanks.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Copying across columns

Finger too fast.Try this idea

Sub copycols()
Range("h1,t1,ak1").EntireColumn.Copy cells(2,1)
Range("g1,aj1").EntireColumn.Copy cells(2,4)
'etc
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Gemz" wrote in message
...
Hi,

I have the following sample code which keeps creating an error, please can
you tell me whats wrong? the columns to copy need to be in that order.

With oldbk.Sheets(2)

.Columns("H:H,T:T,AK:AK,G:G,AJ:AJ,D:D,AM:AM,AP:AP, AS:AS,AU:AU,AQ:AQ").Copy
Destination:= _
NewbkS2.Range("A1")
End With

thanks.


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
copying data down columns juliejg1 Excel Worksheet Functions 4 August 20th 07 08:37 PM
Copying to columns [email protected] Excel Discussion (Misc queries) 4 October 17th 06 06:19 PM
Copying One column into Two columns Dimri Excel Discussion (Misc queries) 1 September 12th 06 06:07 PM
Copying from columns to Rows scottsman78 Excel Discussion (Misc queries) 5 October 4th 05 04:46 PM
copying columns Deb B. Excel Discussion (Misc queries) 2 November 28th 04 07:55 PM


All times are GMT +1. The time now is 01:45 AM.

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"