Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteRows()
Dim lastrow as Long, i as Long Dim cell as Range lastrow = cells(rows.count,1).End(xlup) for i = lastrow to 1 step -1 set cell = cells(i,1) if cell = 1 then cell.Resize(7,1).EntireRow.Delete end if Next End Sub -- Regards, Tom Ogilvy " wrote: I want to delete rows ie one row that has a certain no in a certain column like 1 in column A and the next 6 rows that follow my problem is that this repeats itself many times in the excel sheet and i am not sure how many times as it varies so i would like to have a macro which does that thank you in advance Regards Indraneel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Links and Linking in Excel | |||
Macro for deleting rows and serialising the remaing rows | Setting up and Configuration of Excel | |||
Macro for deleting rows and serialising the remaing rows | Excel Worksheet Functions | |||
Help!!! I have problem deleting 2500 rows of filtered rows | Excel Programming | |||
deleting hidden rows so i can print only the rows showing?????? | Excel Worksheet Functions |