Delete Row

  • Thread starter Thread starter Blue
  • Start date Start date
B

Blue

Hi

I want to delete any row that has 0 in column O starting at row 4 and
continuing to the end of column O, at the moment column O is 3600 rows but
this will increase.

Thanks in advance

Blue
 
Hi
try the following macro
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
Application.ScreenUpdating = False
LastRow = ActiveSheet.Cells(Rows.Count, "O").End(xlUp).row
For RowNdx = LastRow To 4 Step -1
with Cells(RowNdx, "O")
if .value = 0 then
Rows(RowNdx).Delete
End If
end with
Next RowNdx
Application.ScreenUpdating = True
End Sub
 
Wow that was quick.

Thanks Frank that worked great, Ron will have a look at your site.

Have another query but will start another post.

Thanks Blue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top