Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Gizmofied
 
Posts: n/a
Default Can you delete all hidden columns in an area in one move?

I am wondering if it is possible in Excel to permanently delete all hidden
columns in an area of a worksheet with one move (without having to unhide
every column and then manually delete each column)?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Rech
 
Posts: n/a
Default Can you delete all hidden columns in an area in one move?

This might do it. Tested lightly<g

Sub DelAllHiddenCols()
Dim Col As Range
Dim DelCols As Range
For Each Col In Rows(1).EntireColumn
If Col.Hidden Then
If DelCols Is Nothing Then
Set DelCols = Col
Else
Set DelCols = Union(DelCols, Col)
End If
End If
Next
If Not DelCols Is Nothing Then DelCols.Delete
End Sub


--
Jim
"Gizmofied" wrote in message
...
|I am wondering if it is possible in Excel to permanently delete all hidden
| columns in an area of a worksheet with one move (without having to unhide
| every column and then manually delete each column)?


  #3   Report Post  
Posted to microsoft.public.excel.misc
Gizmofied
 
Posts: n/a
Default Can you delete all hidden columns in an area in one move?

Thank you - I will try this out.

"Jim Rech" wrote:

This might do it. Tested lightly<g

Sub DelAllHiddenCols()
Dim Col As Range
Dim DelCols As Range
For Each Col In Rows(1).EntireColumn
If Col.Hidden Then
If DelCols Is Nothing Then
Set DelCols = Col
Else
Set DelCols = Union(DelCols, Col)
End If
End If
Next
If Not DelCols Is Nothing Then DelCols.Delete
End Sub


--
Jim
"Gizmofied" wrote in message
...
|I am wondering if it is possible in Excel to permanently delete all hidden
| columns in an area of a worksheet with one move (without having to unhide
| every column and then manually delete each column)?



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 do I make excel hide columns when it says cannot move objects Dale Excel Discussion (Misc queries) 0 November 10th 05 02:44 PM
Cell protection with hidden columns Anat Excel Discussion (Misc queries) 1 November 9th 05 02:30 AM
PLEASE HELP - Pasting Cells to WrkSheet with Hidden Columns Rob the Winer Excel Worksheet Functions 7 October 5th 05 03:41 AM
Formula to delete blank cells across multiple columns? SamFunMail Excel Worksheet Functions 2 September 1st 05 07:05 AM
How to have multiple columns in pivot table data area? mitch1962 Excel Worksheet Functions 1 February 24th 05 01:22 AM


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