A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
if the column totals are on row 100 for example and you want to check colums A:Z you could do this
Sub HideColumn()
Dim cell As Range
For Each cell In Range("A100:Z100")
If cell = 0 Then
cell.EntireColumn.Hidden = True
End If
Next cell
End Sub
Note as written this does not unhide columns whose value on row 100 is not >0. Also this macro requires that you run it manually, you could make it run automatically by attaching it to a Change event.
This macro is for hiding columns, some change would give you ones to hide rows.
If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire