LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Auto Hide-Unhide Columns with a macro

Give this a whirl...

Sub HideUnhideColumns()
Dim rngToHide As Range

On Error Resume Next
Set rngToHide = ActiveCell.EntireRow.SpecialCells(xlCellTypeBlanks )
On Error GoTo 0

If Not rngToHide Is Nothing Then
ActiveSheet.Cells.EntireColumn.Hidden = False
rngToHide.EntireColumn.Hidden = True
End If
End Sub

--
HTH...

Jim Thomlinson


"Ed" wrote:

Hello,
I have a table from A1:EG70 that looks like a checkerboard, not all cells
have info in them. Does anyone know a macro to auto hide the empty columns
within the active row? The idea is to have visible only the columns with info
while browsing vertically the different entries.

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
Auto hide/Unhide columns Vespaguy Excel Worksheet Functions 5 August 25th 07 01:08 AM
Hide/Unhide columns using button on top over relevant columns [email protected] Excel Discussion (Misc queries) 1 March 7th 07 09:24 PM
Using Hide, Unhide, and auto filter - select all on a protected sh Pattie Excel Worksheet Functions 1 July 7th 06 04:47 PM
How to auto hide and unhide columns using 1 and 2 icons R. Rebello Excel Worksheet Functions 1 May 12th 06 08:10 AM
How do I hide or unhide zero value columns/rows USING A MACRO? paul Excel Discussion (Misc queries) 1 January 23rd 06 03:06 PM


All times are GMT +1. The time now is 04:29 AM.

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"