Macro to delete rows between named ranges in excel
Closed
prafulk
Posts
1
Registration date
Monday July 15, 2013
Status
Member
Last seen
July 15, 2013
-
Jul 15, 2013 at 05:46 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 16, 2013 at 12:02 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 16, 2013 at 12:02 PM
Related:
- Macro to delete rows between named ranges in excel
- Number to words in excel - Guide
- How to delete whatsapp account without login - Guide
- Gif in excel - Guide
- How to delete a row in a table in word - Guide
- How to take screenshot in excel - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jul 16, 2013 at 12:02 PM
Jul 16, 2013 at 12:02 PM
Hi Prafulk,
This code will delete rows between your named ranges SUBHEADER_001 and SUBFOOTER_001:
Best regards,
Trowa
This code will delete rows between your named ranges SUBHEADER_001 and SUBFOOTER_001:
Sub Test() Dim fRow, lRow As Integer fRow = Range("SUBHEADER_001").Row + 1 lRow = Range("SUBFOOTER_001").Row - 1 If lRow < 2 Then Exit Sub Range(Rows(fRow), Rows(lRow)).Delete End Sub
Best regards,
Trowa