excel vba delete 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

0
0
A-312 69370 points

                                    ' Removes 3rd row
ThisWorkbook.Worksheets(1).Rows(3).EntireRow.Delete
' Just clear cells without removing row
ThisWorkbook.Worksheets("Feuil1").Rows(3).Cells.ClearContents

' Removes 3rd row of a range
Range("My_RANGE").Rows(3).EntireRow.Delete

0
0
4.11
9
Phoenix Logan 186120 points

                                    Sub DeleteRowswithSpecificValue()
For i = Selection.Rows.Count To 1 Step -1
If Cells(i, 2).Value = "Printer" Then
Cells(i, 2).EntireRow.Delete
End If
Next i
End Sub

4.11 (9 Votes)
0
4.33
6
Lionel Aguero 33605 points

                                    Sub Delete_Every_Third_Row()
Dim Rng As Range
Set Rng = Application.InputBox("Select the Range (Excluding headers)", "Range Selection", Type:=8)
For i = Rng.Rows.Count To 1 Step -3
If i Mod 3 = 0 Then
Rng.Rows(i).Delete
End If
Next i
End Sub

4.33 (6 Votes)
0
4
10
Bippy 8155 points

                                    ' Removes 3rd row
ThisWorkbook.Worksheets(1).Rows(3).EntireRow.Delete
' Just to clear cells without removing the row
ThisWorkbook.Worksheets("Feuil1").Rows(3).Cells.ClearContents
' Removes 3rd row of a range
Range("My_RANGE").Rows(3).EntireRow.Delete

4 (10 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
Delete rows in VBA remove emty rows vba excel clear range of cells in vba delete range of row values in excel vba excel vba delete table and paste range excel vba delete blank rows from list object excel vba remove blank rows from list object range delete vba Delete all empty rows in a range vba VBa Delete empty cells in a column vba delete table rows excel vba delete sql record delete entire row vba excel vba excel delte sheet delete row from table vba delete range row vba excel vba remove blank cells hide a range of rowsin excel vba delete entire row vba delete whole sheet vba excel vba select rows and delete delete all blank rows in excel vba vba row delete excel vba delete rows to end of sheet delete celected table rows vba delete table rows vba vba excel macro delete rows vba delete table row how to hide empty rows in excel vba how to find and delete cells in excel vba delete entire row in vba delete blank row vba excel vba delete a sheet 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 row by cell in vba excel how to delete entire sheet in excel vba how to delete sheet in excel vba excel cell delete vba delete empty rows in excel vba vba delete whole row vba excel fully delete row vba delete row for loop vba delete range rows vba code to remove formula from cells how to delete specific range in vba vba macro to delete rows vba excel macro delete row vba select rows range and delete vba select rows and delete delete sheet excel vba delet all row in vba excel excel vba delete row if cell length find and delete rows in excel using vba find a set of values in a range excel vba and remove rows excel vba remove excel vba delete sgeet excel vba remove filters from table vba excel delete rows in range excel comment delete vba vba excel delete entire cell find the values in a given range and delete whole rows if found excel vba excel vba delete hidden rows vba Delete Empty rows vba Delete_Empty_rows vba excel delete range vba delete xlCellTypeVisible for row delete named range excel vba vba remove a table excel vba delete empty rows in range delete empty cells vba vba delete rows based on blank column value excel vba delete coluns vba delete rows in a table delete sheets in excel using vba Excel VBA remove range reference from another range Excel VBA removed range from another range delete a range vba EntireRow Delete excell vba excel delete rows vba delete rows excel vba vba remove empty delete values vba excel excel vba delete sheet delete rows with 0 using vba excel vba clear range values excel vba delete value in cell excel vba entirerow delete excel vba delete all rows after certain row vba delete column range vba excel delete a sheet excel vba delete every other row in table 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 Excel vba delete worksheet range excel delete sheet vba deletion of rows in vba with cell value blank filter data delete the blank rows in excel vba filter and delte using vba in excel excell delete cell vba if then delete row vba excel conditional deletion of rows using vba excel vba delete row in word table delete content excel vba vba delete range row delete empty table rows vba delete all rows in excel vba vba empty row delete excel vba delete everything below a row delete empty rows in excel VBA remove duplicates from table delete rows with value excel vba excel vba entire sheet delete Excel vba clear content from row 2 VBA clear row excel vba filter and delete rows how to delete empty rows in excel vba excel delete empty rows delate entire rows empty vba delate all empty rows vba delate rows vba delete rows after empty row vba vba delete entire row how to delete entire row from visible cells in excel vba excel vba select row range and delete excel vba delete row excel vba delete empty rows in range vba excel delete sheet entire row delete vba vba excel delete blank rows vba remove row vba doc delete row vba delete row with criteria delete all the values in a range vba excel row delete vba how to delete cell content in excel vba vba delete blank rows vba delete row with loop vba remove rows delete trailing blank rows in excel vba entire row delete vba excel excel vba delete empty rows row delete vba delete entirerow vba delete specific row vba vba excel delete every other row delete entire row excel macro filter and delete rows using VBA filter excel file and delete rows using VBA delete rows from excel based on a condition using vba macro code to delete rows in excel excel vba delete rows in range excel vba delete rows entirerow delete vba delete rows sub delete content cell vba excel macro delete row remove rows vba VBA delete row on worksheet clear excel lines vba vba code to delete specific entire row rows.delete vba row delete excel macro to delete row by number of line excel macro to delete row how to delete row in excel vba excel vba delete sheet rows vba excel delete row vba code to delete entire row how to delete rows in excel vba code to delete entire row in vba delete row vba how to delete a row in vba vba delete row How to delete rows in vba delete number of rows vba delete row vba excel vba delete rows delete row excel vba deleting a row in excel vba vba excel copy date multiple times delete rows in excel 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