Excel Automatically hide Excel rows

Joined
Mar 4, 2010
Messages
1
Reaction score
0
Excel 2007

I have a macro on an excel workbook which enables rows within a sheet to be hidden if their value is 0.

However at the moment I have to trawl through each worksheet to hide and unhide the rows.

Is there a macro which would enable me to do this on all worksheets at the press of one button.

Thank you.

This is the macro in place at the moment.

Sub hide_unused()
'
'MACROS BY EXCELZOOM.COM

Application.ScreenUpdating = False
Range("a7:a2000").Select
Rng = Selection.Rows.Count
For i = 1 To Rng
If ActiveCell = 0 Then
Selection.EntireRow.Hidden = True
ActiveCell.Offset(1, 0).Select
Else: Selection.EntireRow.Hidden = False
ActiveCell.Offset(1, 0).Select
End If
Next i
Application.ScreenUpdating = True
End Sub
 
feckit said:
You have posted twice, do you have 2 problems or 1, i'm confused?:p

That was just me moving the thread to a new forum :)
 
Back
Top