Vba Excel Delete Every Other Row

[Solved] Vba Excel Delete Every Other Row | Vb - Code Explorer | yomemimo.com
Question : delete rows in excel vba code

Answered by : attractive-anaconda-auyq8jrkli4a

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

Source : https://trumpexcel.com/vba-delete-row-excel/ | Last Update : Tue, 05 May 20

Question : excel delete ever other vba

Answered by : bright-booby-9qimryuf2eaw

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

Source : https://trumpexcel.com/delete-every-other-row-excel/ | Last Update : Tue, 09 Feb 21

Answers related to vba excel delete every other row

Code Explorer Popular Question For Vb