Macro to delete specific number of rows.
Closed
Rahul
-
Jun 6, 2012 at 06:46 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Jun 7, 2012 at 09:37 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Jun 7, 2012 at 09:37 AM
Related:
- Macro to delete specific number of rows.
- How to find specific words on a page - Guide
- How do i find a specific video on youtube - Guide
- How to delete part of a table in word - Guide
- How to delete whatsapp account without login - Guide
- How to delete skype account permanently - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Contributor
Last seen
December 27, 2022
555
Jun 7, 2012 at 09:37 AM
Jun 7, 2012 at 09:37 AM
Hi Rahul,
Here you go:
Best regards,
Trowa
Here you go:
Sub DeleteRows()
Dim lRow, x, y As Integer
lRow = Range("A" & Rows.Count).End(xlUp).Row
x = 1
Do
x = x + 50
Rows(x & ":" & x + 6).ClearContents
Loop Until x > lRow
For y = lRow To 1 Step -1
If Range("A" & y).Value = vbNullString Then Rows(y).Delete
Next y
End Sub
Best regards,
Trowa