Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Copy and paste columns

I am trying to copy and paste columns of data from one sheet into another. I
have named the ranges CUST, PART, REG etc. but I cannot get the macro to
paste all the columns.

Thank you,

Esther
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Copy and paste columns

Hi Esther,

what exactly is the problem? Can't you copy some of the named ranges at
all or some of the columns in named ranges cannot be copied?

Please try to be more specific.

Regards,

Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Copy and paste columns

I does now work but although I specified below the order I wanted them
copied, when it pastes into the new sheet it is in the original order. Is
there a way around this?

Thanks,

Esther


Worksheets(1).Range("CUST,REG,CUSTACC,RSM,MKTSEG,T ECH,CUSTPN,CMACPN,ATT,PLAT,SEPOOHQTY,SEPUNITPRICE" ).Copy
Sheets("Sheet2").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

"Ivan Raiminius" wrote:

Hi Esther,

what exactly is the problem? Can't you copy some of the named ranges at
all or some of the columns in named ranges cannot be copied?

Please try to be more specific.

Regards,

Ivan


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Copy and paste columns

Hi Esther,

if you want to change order of columns, you have to rearange them after
copying, or to copy them one by one in desired order.

Regards,

Ivan

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy and paste columns

Another way to do it would be to use an advanced filter. This assumes you
worksheet is similar to a database and the first row has "column/field
headers"

You would write the headers in the order you want in the destination sheet
(with code of course), then use the advanced filter to populate them.

Post back if that sounds like something that would fit your needs.

--
Regards,
Tom Ogilvy


"Ivan Raiminius" wrote:

Hi Esther,

if you want to change order of columns, you have to rearange them after
copying, or to copy them one by one in desired order.

Regards,

Ivan




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
copy and paste visible columns ferde Excel Discussion (Misc queries) 1 December 8th 05 08:42 AM
Why can't a copy and paste columns? Nicole L. Excel Worksheet Functions 3 February 10th 05 06:55 PM
Copy/Paste of separated columns mareku Excel Discussion (Misc queries) 2 January 5th 05 10:04 PM
copy and paste in different columns with conditions 71marco71[_3_] Excel Programming 1 January 31st 04 03:10 PM
copy and paste in different columns with conditions 71marco71 Excel Programming 1 January 27th 04 06:03 PM


All times are GMT +1. The time now is 07:46 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"