Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Prog. Hide range and indiv. columns?

Is it possible to hide a range of columns programatically as well as
additional free floating columns elswhere on the work sheet.

For instance, this hides a range::

Columns("C:N").Select
Selection.EntireColumn.Hidden = True

But, what I really want to achieve is this:

Columns("C:N, P, Y, W").Select
Selection.EntireColumn.Hidden = True

....Of course, this throws up an error...is there a way to rephrase this code
to make it do what I want?

Many thanks
Jason

Excel 2000







  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Prog. Hide range and indiv. columns?

Hi Jason,

Range("C:N,P:P,Y:Y,W:W").EntireColumn.Hidden = True


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
...
Is it possible to hide a range of columns programatically as well as
additional free floating columns elswhere on the work sheet.

For instance, this hides a range::

Columns("C:N").Select
Selection.EntireColumn.Hidden = True

But, what I really want to achieve is this:

Columns("C:N, P, Y, W").Select
Selection.EntireColumn.Hidden = True

...Of course, this throws up an error...is there a way to rephrase this

code
to make it do what I want?

Many thanks
Jason

Excel 2000









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
How can I hide a range of columns without hiding charts there? dbsavoy Charts and Charting in Excel 2 August 31st 06 04:30 PM
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? Marc New Users to Excel 1 March 10th 06 05:10 PM
Hide columns & rows that contain "0" or blank in a range of cells lw new guest Excel Worksheet Functions 0 August 18th 05 04:27 PM
How to hide a Range of Columns? scrap08[_2_] Excel Programming 0 June 29th 04 12:51 PM
How to hide a Range of Columns? scrap08 Excel Programming 0 June 29th 04 12:50 PM


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