Sub DeleteHiddenRows_Workbook() 'This Microsoft Excel Macro will remove hidden rows from End Sub
'all worksheets in a workbook.
For i = 1 To Worksheets.Count
If Worksheets(i).Visible Then
Worksheets(i).Select
ActiveCell.SpecialCells(xlLastCell).Select
k = ActiveCell.Row
For j = 1 To k
If Rows(j).Hidden Then
Rows(j).Hidden = False
Rows(j).Delete
End If
Next j
End If
Next i
If Worksheets(1).Visible Then Worksheets(1).Select
Tuesday, March 13, 2012
Delete hidden rows
Posted by AG at 1:49 AM
Labels: delete hidden rows, Macro
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment