Paste the following into a regular module :
Option Explicit
'If the entire Column is empty :
Sub HideCol()
Dim N As Long, wf As WorksheetFunction, M As Long
Dim i As Long, j As Long
N = Columns.Count
M = Rows.Count
Set wf = Application.WorksheetFunction
Application.ScreenUpdating = False
For i = 26 To 1 Step -1 '<<<---------------------------- Change 26 (Col Z) to reflect max columns possible
If wf.CountBlank(Columns(i)) <> M Then Exit For
Next i
For j = i To 1 Step -1
If wf.CountBlank(Columns(j)) = M Then
Cells(1, j).EntireColumn.Hidden = True
End If
Next j
Application.ScreenUpdating = True
End Sub
Create a command button that is attached to the above macro.