Macro to delete row after certain condition found
Solved/Closed
wendelly
Posts
4
Registration date
Thursday 3 April 2014
Status
Member
Last seen
4 April 2014
-
3 Apr 2014 à 15:39
wendelly Posts 4 Registration date Thursday 3 April 2014 Status Member Last seen 4 April 2014 - 4 Apr 2014 à 15:23
wendelly Posts 4 Registration date Thursday 3 April 2014 Status Member Last seen 4 April 2014 - 4 Apr 2014 à 15:23
Related:
- Macro to delete row after certain condition found
- How to delete a row in word - Guide
- Saints row 2 cheats - Guide
- Does instagram delete message requests after 4 weeks - Guide
- How to delete skype account - Guide
- Sed delete line - Guide
5 responses
aquarelle
Posts
7181
Registration date
Saturday 7 April 2007
Status
Moderator
Last seen
14 February 2026
491
4 Apr 2014 à 12:02
4 Apr 2014 à 12:02
I presumed that there were titles on the Row 1, put this macro on the sheet you want to use it, in VBA project :
Regards
Public Sub DeleteRowIfCellZero_ColD()
Dim x As Long
Dim y As Long
x = Range("D65536").End(xlUp).Row
For y = x To 2 Step -1
If Cells(y, 4).Value = 0 Then
Rows(y + 1).EntireRow.Delete
End If
Next y
End Sub
Regards
aquarelle
Posts
7181
Registration date
Saturday 7 April 2007
Status
Moderator
Last seen
14 February 2026
491
4 Apr 2014 à 09:30
4 Apr 2014 à 09:30
Hello,
Which column? Everytime the same column or not?
Regards
Which column? Everytime the same column or not?
Regards
wendelly
Posts
4
Registration date
Thursday 3 April 2014
Status
Member
Last seen
4 April 2014
4 Apr 2014 à 10:09
4 Apr 2014 à 10:09
Hello, it would be the same column every time. Thanks.
aquarelle
Posts
7181
Registration date
Saturday 7 April 2007
Status
Moderator
Last seen
14 February 2026
491
4 Apr 2014 à 10:16
4 Apr 2014 à 10:16
Which? A B C...?
wendelly
Posts
4
Registration date
Thursday 3 April 2014
Status
Member
Last seen
4 April 2014
4 Apr 2014 à 10:45
4 Apr 2014 à 10:45
It would be column D.
wendelly
Posts
4
Registration date
Thursday 3 April 2014
Status
Member
Last seen
4 April 2014
4 Apr 2014 à 15:23
4 Apr 2014 à 15:23
That worked brilliantly. Thanks.