using your code with mine (your code was very helpful to me by the way,
thank you :-))
this will look in all cells from cell A2 (so it ignores the title cell)
and change the value of the cell to 'delete' if it does not equal
'abc'.
when this is finshed it will then run your code which deletes the row
and shifts it up if the value equals 'delete'
---Sub subname()
Dim cell As Range
For Each cell In Range("A2:A65536")
If cell.Value = "" Then
Run ("Del_zero")
End
Else
If cell.Value < "abc" Then
cell.Value = "delete"
Else
End If
End If
Next
End Sub
Sub Del_zero()
findstring = "delete"
Set B = Range("A:A").Find(What:=findstring, LookAt:=xlWhole)
While Not (B Is Nothing)
B.EntireRow.Delete
Set B = Range("A:A").Find(What:=findstring, LookAt:=xlWhole)
Wend
End Sub
---
Thanks
John
--
johncassell
------------------------------------------------------------------------
johncassell's Profile:
http://www.excelforum.com/member.php...o&userid=25016
View this thread:
http://www.excelforum.com/showthread...hreadid=565629