VBA code to delete rows in a worksheet based on a condition


 Sub DeleteRows()

   Dim i As Long

   For i = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1

      If Range("A" & i).Value = "Delete" Then

         Rows(i).Delete

      End If

   Next i

End Sub

VBA code to delete rows in a worksheet based on a condition

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.