Option Explicit
Sub Macro2()
Dim rngFound As Range
Dim lngMyRow As Long
Dim lngLastCol As Long
Dim lngMyCol As Long
Dim strMyCol As String
With Range("B:B")
Set rngFound = .Find(What:="Grand Total", After:=.Cells(.Cells.Count), _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
If Not rngFound Is Nothing Then
lngMyRow = rngFound.Row
Else
MsgBox "The text ""Grand Total"" (not case sensitive) was not found in Col. B"
Exit Sub
End If
End With
Application.ScreenUpdating = False
On Error Resume Next 'Account for there being no data on the tab
lngLastCol = Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
If lngLastCol >= 3 Then 'Only work if there's 3 or more columns
For lngMyCol = lngLastCol To 3 Step -1
strMyCol = Left(Cells(1, lngMyCol).Address(True, False), Application.WorksheetFunction.Search("$", Cells(1, lngMyCol).Address(True, False)) - 1)
If Val(Range(strMyCol & lngMyRow)) = 0 Then
Columns(strMyCol).Hidden = True
Else
Columns(strMyCol).Hidden = False
End If
Next lngMyCol
End If
On Error GoTo 0
Application.ScreenUpdating = True
End Sub