Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Un hide non empty columns
Is there a macro to un-hide already hidden column which are not blank?
Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Un hide non empty columns
Try this: Sub UnhideCol() Dim I As Integer, StartAdr As Variant, EndAdr As Variant StartAdr = Range("A1").Address EndAdr = Range("A65536").Address For I = 0 To 255 StartAdr = Range("A1").Offset(0, I).Address EndAdr = Range("A65536").Offset(0, I).Address If Application.WorksheetFunction.CountBlank(Range(Sta rtAdr & ":" & EndAdr)) < 65536 Then Range(StartAdr & ":" & EndAdr).EntireColumn.AutoFit End If Next I Range("A1").Select End Sub Jozef -- Joseph_L ------------------------------------------------------------------------ Joseph_L's Profile: http://www.excelforum.com/member.php...fo&userid=7202 View this thread: http://www.excelforum.com/showthread...hreadid=519428 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I automatically hide empty columns in Excel? | Excel Discussion (Misc queries) | |||
Want to Hide columns in spreadsheet but NOT hide data in chart. | Charts and Charting in Excel | |||
Finding next empty empty cell in a range of columns | Excel Programming | |||
URGENT!! Use macro button to hide empty columns and rows...HELP!!!! | Excel Programming | |||
How to auto hide an empty row with VBA? | Excel Programming |