Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a range of columns suppose D-O. Every month one column is
populated with the data. I want to create a Macro which can unhide the columns with data and hide the empty columns. thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub HideColumns()
Dim cell as Range, cnt as Long for each cell in Range("D1:O1") cnt = Application.CountA(cell.entireColumn) if cnt < 2 then cell.EntireColumn.Hidden = True else cell.EntireColumn.Hidden = False end if next end Sub " wrote: I have a range of columns suppose D-O. Every month one column is populated with the data. I want to create a Macro which can unhide the columns with data and hide the empty columns. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to hide rows/colums by value | Excel Programming | |||
Macro to Hide Colums | Excel Programming | |||
What is the quickest way to hide a lot of rows and colums ? | Excel Discussion (Misc queries) | |||
How can I hide data in colums. | Excel Discussion (Misc queries) | |||
Hide colums based on dropdown list | Excel Programming |