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 Moderator Last seen December 27, 2022 - Jun 7, 2012 at 09:37 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jun 7, 2012 at 09:37 AM
Related:
- Macro to delete specific number of rows.
- How to delete whatsapp account without login - Guide
- How to find specific words on a page - Guide
- How to delete blacklist number - Guide
- Spell number in excel without macro - Guide
- How to delete whatsapp account without phone - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
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