LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Hide non-contiguous columns

Greetings:
Have for some time used the following in a number of applications
Columns("F:G").Select
Selection.EntireColumn.Hidden = True
Works Great:
Now I need to add column J, as well.
After checking group sites, I tried:
Columns("F:G,J").Select
Columns("F:G,J:K").Select
etc................. .
F and G always hides fine
J (and K) are to stubborn to disappear.

Then I read in one post to use "Select" as little as possible, so I changed to
Range("F:G,J:K").EntireColumn.Hidden = True
and variations thereof.
Again, F and G disappear, J and K just keep hanging around.

Once again, I'm likely missing something obviouis, but I just can't find it.
Please help.

ALSO: Why is it recommended to be good coding practice to use SELECT as
infrequently as possible?

Thanks

 
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
Sort Contiguous Columns - Danger WCM Excel Discussion (Misc queries) 3 May 1st 10 01:15 PM
Charting with non contiguous columns David Hopper Charts and Charting in Excel 3 April 7th 07 01:00 AM
DCOUNT for non-contiguous columns RiotLoadTime Excel Worksheet Functions 4 July 3rd 06 03:12 PM
How do I reference non-contiguous columns in another sheet and th. Bill Nash Excel Discussion (Misc queries) 3 March 3rd 05 05:47 PM
Is there a maximum number of non-contiguous columns that can be h. Harold Excel Discussion (Misc queries) 6 March 1st 05 09:10 PM


All times are GMT +1. The time now is 03:40 PM.

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"