delete rows in excel vba code
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
delete rows in excel vba code
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
vba excel delete every other row
Sub Delete_Even()
Application.ScreenUpdating = False
lr = Cells(ActiveSheet.Rows.Count, 1).End(xlUp).Row
If lr Mod 2 = 0 Then
Else
lr = lr - 1
End If
For i = lr To 1 Step -2
Rows(i & ":" & i).Delete Shift:=xlUp
Next i
Application.ScreenUpdating = True
End Sub
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us