Hi
try the following macro
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "C").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
with Cells(RowNdx, "C")
if .value = "a" then
Rows(RowNdx).Delete
End If
end with
Next RowNdx
Application.ScreenUpdating = True
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
Hi guys,
is there a way of deleting rows, on the basis that a cell in the
particular rows, contains a word like "closed" or "suspended"
e.g rows c4 to c450 contains a, b, c, d, e and i want to delete all
the rows containing "a" in that particular column using macros.
can you please help me out??
Thanks Cathal.
---
Message posted from http://www.ExcelForum.com/