Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Contiguous Column Selection using variables

Hello,

I am looking for a way to select 28 contiguous columns using
variables.

x = Activecell.Column

I would like to select the column after x (say 22, through 40)

I know the following works:
Columns(x+1).select would only select the first column but how do I
select the remaining 28 columns?

Thank you
Leslie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Contiguous Column Selection using variables

Columns(x+1).Resize(,28).select

--
Regards,
Tom Ogilvy


"Leslie Payne" wrote in message
om...
Hello,

I am looking for a way to select 28 contiguous columns using
variables.

x = Activecell.Column

I would like to select the column after x (say 22, through 40)

I know the following works:
Columns(x+1).select would only select the first column but how do I
select the remaining 28 columns?

Thank you
Leslie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Contiguous Column Selection using variables

Hi Leslie,

Try this

ActiveCell.Resize(1, x).EntireColumn.Select


--

HTH

RP

"Leslie Payne" wrote in message
om...
Hello,

I am looking for a way to select 28 contiguous columns using
variables.

x = Activecell.Column

I would like to select the column after x (say 22, through 40)

I know the following works:
Columns(x+1).select would only select the first column but how do I
select the remaining 28 columns?

Thank you
Leslie



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Contiguous Column Selection using variables

Leslie Payne wrote:

Hello,

I am looking for a way to select 28 contiguous columns using
variables.

x = Activecell.Column

I would like to select the column after x (say 22, through 40)

I know the following works:
Columns(x+1).select would only select the first column but how do I
select the remaining 28 columns?

Thank you
Leslie

23 through is only 18 columns.

Alan Beban
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
Non-contiguous selection Kay Excel Discussion (Misc queries) 3 May 9th 08 05:20 AM
Finding last column in non-contiguous range Bob Excel Worksheet Functions 6 February 5th 07 08:58 PM
add all contiguous numbers-column-row Bernard Liengme New Users to Excel 0 May 2nd 06 02:02 PM
Non-contiguous selection PBezucha[_2_] Excel Programming 1 July 13th 04 03:22 PM
Help : Code for selection non-contiguous cells Majeed Excel Programming 1 November 24th 03 06:49 PM


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