excel vba delete empty rows

' Deletes empty rows
dim rRange As Range, rowsCount As Long, i As Long
Set rRange = ActiveSheet.Range("A1:B100")
rowsCount = rRange.rows.Count
For i = rowsCount To 1 Step -1
    If WorksheetFunction.CountA(rRanges.rows(i)) = 0 Then 
        rRange.rows(i).Delete
    End If
Next

4.11
9
Krish 100200 points

                                    Dim iCounter As Long
With Application
    .Calculation = xlCalculationManual
    .ScreenUpdating = False
    For iCounter = Selection.Rows.Count To 1 Step -1
        If WorksheetFunction.CountA(Selection.Rows(iCounter)) = 0 Then
            Selection.Rows(iCounter).EntireRow.Delete
        End If
    Next iCounter
    .Calculation = xlCalculationAutomatic
    .ScreenUpdating = True
End With

4.11 (9 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
excel vba delete rows remove emty rows vba excel excel vba delete blank rows from list object excel vba remove blank rows from list object Delete all empty rows in a range vba VBa Delete empty cells in a column delete entire row vba excel excel vba remove blank cells delete all blank rows in excel vba how to hide empty rows in excel vba delete blank row vba delete entire row vba how to delete the entire blank row in excel vba how to delete the entire row in excel vba delete row if cell is blanck in vba excel delete empty rows in excel vba vba delete whole row vba excel fully delete row vba delete entire row excel vba delete row if cell length vba Delete Empty rows vba Delete_Empty_rows vba delete empty rows in range delete empty cells vba vba delete rows based on blank column value vba remove empty excel vba delete all rows after certain row excel vba entirerow delete excel vba delete rows in table where first column is blank excel vba delete rows in table where cell is blank excel vba delete empty rows in table deletion of rows in vba with cell value blank filter data delete the blank rows in excel vba delete empty table rows vba vba empty row delete delete empty rows in excel Excel vba clear content from row 2 VBA clear row how to delete empty rows in excel vba excel delete empty rows delate entire rows empty vba delate all empty rows vba delete rows after empty row vba excel vba delete row excel vba delete empty rows in range entire row delete vba vba excel delete blank rows vba delete blank rows delete trailing blank rows in excel vba excel vba delete empty rows vba script delete empty rows excel purge empty rows vba excel purge empty rows macro vba delete all rows where 2 columns are empty vba delete empty row vba empty row vba remove empty rows vba quick sheet remove empty in r once blank rows is reached delete all following rows remove all blank rows in excel vba deleting all blank cells in excel using vba code
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source