Un hide non empty columns
Is there a macro to un-hide already hidden column which are not blank?
Thanks |
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 |
All times are GMT +1. The time now is 09:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com