2 replies
by delfeye
Two things:
1) Here is piece of code that will remove your empty rows.
Sub DeleteEmptyRows()
Dim lastRow As Long
Dim r As Long
lastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = lastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub
2) Code for returning to A1
Range("A1").Select
by brifd1
The above is not too clear. I'll try again:
Rows 1 thru 4: header info. Rows 5+: data, some of which I want to delete. What I had tried:
filter the data to delete, hide rows 1 thru 4, select only visible data, delete rows, attempt to unhide rows 1 thru 4 and show all remaining records. What happens: rows 1 thru 4 don't unhide, setting their row height doesn't work, removing the filter doesn't work.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending