Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub DeleteEmptyRows()
'select column A
columns("A:A").Select
'select any blank cells in column A
Selection.SpecialCells(xlCellTypeBlanks).Select
'select the entire row for each of the blank cells in column A
Selection.EntireRow.Select
'delete selection
Selection.Delete
end sub
Sub DeleteEmptyRows()
columns("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
Sub z_DeleteEmptyRowsAndColumns()
Application.ScreenUpdating = False
'following grabs the current activecell
BegAddress = ActiveCell.Address
Range("a1").EntireRow.Select
With Selection
Do
If Application.WorksheetFunction.CountA(Selection) = 0 Then
Selection.EntireRow.Delete
Else
Selection.Offset(1, 0).Select
End If
RowCount = ActiveSheet.UsedRange.Rows.Count
Loop Until ActiveCell.Row >= RowCount
End With
Range("a1").EntireColumn.Select
With Selection
Do
If Application.WorksheetFunction.CountA(Selection) = 0 Then
Selection.EntireColumn.Delete
Else
Selection.Offset(0, 1).Select
End If
ColumnCount = ActiveSheet.UsedRange.columns.Count
Loop Until ActiveCell.Column >= ColumnCount
End With
Range(BegAddress).Activate
Application.ScreenUpdating = True
End Sub
Not at all! You said that your data does meet the criteria that there is a certain column that will always be empty on rows that you want to delete and never be empty on rows you want to keep.AppStaff said:Clearly i underestimated the task....