Hi
try something like the following:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
For RowNdx = LastRow To 1 Step -1
with Cells(RowNdx, "A")
if .value = "value" then
Rows(RowNdx).Delete
End If
end with
Next RowNdx
Application.ScreenUpdating = True
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
Please help with some code for the following .....
I need to create a loop to scan down a column and if the contents of
a
cell are say "D" then delete this row and go onto the next entry.
Thanks
---
Message posted from http://www.ExcelForum.com/