Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows
If the cell value = "ABC" on column A, then I need to delete that row
and the next two rows. What is the formula to do that? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows
Hi
try the following macro: Sub delete_rows() Dim lastrow As Long Dim row_index As Long Application.ScreenUpdating = False lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row For row_index = lastrow - 1 To 1 Step -1 If Cells(row_index, 1).Value = "ABC" then cells(row_index,1).resize(3,1).entirerow.delete End If Next Application.ScreenUpdating = True End Sub -- Regards Frank Kabel Frankfurt, Germany fl wrote: If the cell value = "ABC" on column A, then I need to delete that row and the next two rows. What is the formula to do that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
delete empty rows between rows with text | Excel Discussion (Misc queries) |