Hi There,
I was wondering if anyone has a faster way of deleting hidden rows and columns in the file. I used this method and it is taking quite long to delete the hidden rows and layers. In terms of columns I have about 80, in terms of rows I have 121
Dim LastRow As Integer
Dim LastCol As Integer
Set sht = ActiveSheet
LastRow = ActiveSheet.UsedRange.Rows(sht.UsedRange.Rows.Count).row
LastCol = ActiveSheet.UsedRange.Columns(sht.UsedRange.Columns.Count).Column
For i = LastRow To 1 Step -1
If Rows(i).Hidden = True Then Rows(i).EntireRow.Delete
Next
For i = LastCol To 1 Step -1
If Columns(i).Hidden = True Then Columns(i).EntireColumn.Delete
Next
End Sub
Thanks a bunch!
Will
Bookmarks