Chi_IC_Hawk
New Member
- Joined
- Jun 7, 2011
- Messages
- 2
Hi all -
I have an accounting 13 week cash flow statement where I need to hide columns. The cash flow statement has 52 columns (one for each week) starting in column E and running through BD. In row 3, I have a formula that returns a value if the week is in the current 13 week cash flow. If it isn't, it returns "" (or null).
This is the code I currently have:
Sub HideColumns()
Dim e As Integer
For e = 5 To 56
If Len(ActiveSheet.Cells(3, e).Value) = 0 Then
ActiveSheet.Columns(e).Hidden = True
End If
Next
End Sub
Unfortunately, the way I have this entered, this only does one of the tabs. The file covers multiple worksheets and I need to apply them to a subset of the worksheets.
I know absolutely nothing about macros (I found the above one online after searching). If anybody can provide guidance, please help.
Thanks so much in advance!
I have an accounting 13 week cash flow statement where I need to hide columns. The cash flow statement has 52 columns (one for each week) starting in column E and running through BD. In row 3, I have a formula that returns a value if the week is in the current 13 week cash flow. If it isn't, it returns "" (or null).
This is the code I currently have:
Sub HideColumns()
Dim e As Integer
For e = 5 To 56
If Len(ActiveSheet.Cells(3, e).Value) = 0 Then
ActiveSheet.Columns(e).Hidden = True
End If
Next
End Sub
Unfortunately, the way I have this entered, this only does one of the tabs. The file covers multiple worksheets and I need to apply them to a subset of the worksheets.
I know absolutely nothing about macros (I found the above one online after searching). If anybody can provide guidance, please help.
Thanks so much in advance!