Forum Discussion
osmanmkc
Sep 12, 2021Copper Contributor
Delete multiple lines
Hi there! I use excel for the auctions I organize on the internet. Each line contains the features of a product. When an auction ends, I manually delete the sold products one by one and repost th...
NikolinoDE
Sep 14, 2021Platinum Contributor
Here is a small example with VBA.
Assume that when column "E" is on zero it deletes the respective row.
You can determine the column and value (number and / or text) yourself.
Sample file included :))
Sub Delrows()
Dim i As Long
Application.ScreenUpdating = False
For i = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Cells(i, 5) = "0" Then Rows(i).Delete
Next i
Application.ScreenUpdating = True
End Sub
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
Was the answer useful? Mark them as helpful!
This will help all forum participants.