Question
Thread display: Collapse - |
All Answers
Share your knowledge
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
VBA: How to hide merge column
i'm getting this coding from here...
Sub FilterColumns()
'
' FilterColumns Macro
' Macro created 11/08/2007 by Alan
'
Dim MyRange As Range
Dim c As Range
' Set Range to Filter
Set MyRange = ActiveSheet.Range("a4:z4")
' Loop through Range
For Each c In MyRange
If c.Value = 0 Then
' Hide Column When Value Found
Columns(c.Column).Hidden = True
End If
Next
End Sub
But i got problem for merge column...
example: i'm having merge column (b4 and c4), (d4 and e4) and etc... then i'm running this FilterColumns function... it will hide also column c4 and e4 also (i thinks because c4 and e4 also value= 0. Supposely i just want to hide empty merge column only... so how to solve it.
thanks