How to Write VBA Code To Auto delete Blank Or Empty Rows In Excel? code that works to delete empty or blank rows in ms excel sheet.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
shree
Here is the 100 % percentage working VBA code or script to delete blank or empty rows in Microsoft Excel Sheet.
VBA Code to Delete Blank Rows In Excel :
Sub Delblankrows()
Dim LastRowInSheet As Long
Dim i As Integer
LastRowInSheet = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For i = LastRowInSheet To 2 Step -1
If WorksheetFunction.CountA(Rows(i)) = 0 Then
Rows(i).Delete
End If
Next iEnd Sub