Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Copying Multiple Columns

How do you copy multiple (non-consecutive) columns using the numeric values
of the columns? In other word I am looking for code that does this:
Range("C:C,E:E,G:G").Copy
But, using numbers like this:
Columns(3,5,7).Copy €˜This doesnt work
Any ideas?

Tx,
Randall

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Copying Multiple Columns

Range("3:3,5:5,7:7").Copy

--

Vasant

"Randall" wrote in message
...
How do you copy multiple (non-consecutive) columns using the numeric

values
of the columns? In other word I am looking for code that does this:
Range("C:C,E:E,G:G").Copy
But, using numbers like this:
Columns(3,5,7).Copy 'This doesn't work
Any ideas?

Tx,
Randall



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Copying Multiple Columns

The code:

Range("3:3,5:5,7:7").Copy

copies rows not Columns. How do you do the same thing but for COLUMNS?


"Vasant Nanavati" wrote:

Range("3:3,5:5,7:7").Copy

--

Vasant

"Randall" wrote in message
...
How do you copy multiple (non-consecutive) columns using the numeric

values
of the columns? In other word I am looking for code that does this:
Range("C:C,E:E,G:G").Copy
But, using numbers like this:
Columns(3,5,7).Copy 'This doesn't work
Any ideas?

Tx,
Randall




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying Multiple Columns

Range("C:C,E:E,G:G").Copy

--
Regards,
Tom Ogilvy


"Randall" wrote in message
...
The code:

Range("3:3,5:5,7:7").Copy

copies rows not Columns. How do you do the same thing but for COLUMNS?


"Vasant Nanavati" wrote:

Range("3:3,5:5,7:7").Copy

--

Vasant

"Randall" wrote in message
...
How do you copy multiple (non-consecutive) columns using the numeric

values
of the columns? In other word I am looking for code that does this:
Range("C:C,E:E,G:G").Copy
But, using numbers like this:
Columns(3,5,7).Copy 'This doesn't work
Any ideas?

Tx,
Randall






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Copying Multiple Columns

Sorry; long day at work.

Probably better ways, but perhaps:

Union(Columns(3),Columns(5),Columns(7)).Copy

--

Vasant



"Randall" wrote in message
...
The code:

Range("3:3,5:5,7:7").Copy

copies rows not Columns. How do you do the same thing but for COLUMNS?


"Vasant Nanavati" wrote:

Range("3:3,5:5,7:7").Copy

--

Vasant

"Randall" wrote in message
...
How do you copy multiple (non-consecutive) columns using the numeric

values
of the columns? In other word I am looking for code that does this:
Range("C:C,E:E,G:G").Copy
But, using numbers like this:
Columns(3,5,7).Copy 'This doesn't work
Any ideas?

Tx,
Randall






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 multiple rows to columns calvin Excel Discussion (Misc queries) 1 January 24th 09 12:07 AM
Copying formula to sum multiple columns Kathy Excel Worksheet Functions 3 May 4th 08 06:06 AM
Copying to multiple pages and keeping columns sized correctly??? Lyndsie Excel Discussion (Misc queries) 2 July 26th 07 03:24 PM
Copying 1 column into multiple columns Jshendel Excel Discussion (Misc queries) 2 May 4th 06 03:26 PM
Copying multiple columns not adjacent Doug Wilson Excel Discussion (Misc queries) 2 July 8th 05 08:51 PM


All times are GMT +1. The time now is 08:13 AM.

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

About Us

"It's about Microsoft Excel"