Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default How to select columns using column index

Greetings! I would like to select column D to K. Instead of using
Columns("D:K").select, I tried Columns("4:11").select. It did not work. How
can I make it work if I only know the column index? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to select columns using column index

How about:

range("d:k").select
or
range(Columns(4),columns(11)).select
or
columns(4).resize(,8).select



luvgreen wrote:

Greetings! I would like to select column D to K. Instead of using
Columns("D:K").select, I tried Columns("4:11").select. It did not work. How
can I make it work if I only know the column index? Thanks.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default How to select columns using column index

Thank you so much for answering my question. It worked great!

"Dave Peterson" wrote:

How about:

range("d:k").select
or
range(Columns(4),columns(11)).select
or
columns(4).resize(,8).select



luvgreen wrote:

Greetings! I would like to select column D to K. Instead of using
Columns("D:K").select, I tried Columns("4:11").select. It did not work. How
can I make it work if I only know the column index? Thanks.


--

Dave Peterson

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
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
=INDEX($B$2:$P$2,COLUMNS(B$2:$P$2)) Dave F[_2_] Excel Discussion (Misc queries) 3 December 22nd 07 05:57 PM
How do you select line or columns in "Line-Column on 2 axes" graphs? mizterbusy Excel Discussion (Misc queries) 0 September 19th 06 06:48 AM
INDEX() columns first spxer Excel Worksheet Functions 9 August 6th 06 12:22 AM
Problem using INDEX to select items in listbox Shazbot Excel Discussion (Misc queries) 3 April 28th 06 09:06 AM


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