routine errors out also would prefer to delete instead of cl

  • I use the following to sort and clear rows that have ------ in them. However after the rows are cleared the routine errors out. I would prefer that the routine just terminate. I would also like to delete the rows instead of just clearing the contents. All help is appreciated

    With Worksheets(1).Columns("A:A")
    Set c = .Find(" ------*", LookIn:=xlValues)
    If Not c Is Nothing Then
    firstAddress = c.Address
    c.Value = Clear
    Set c = .FindNext(c)
    Loop Until c.Address = firstAddress
    End If
    End With

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!