Thread
:
Trouble with this code
View Single Post
#
3
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Trouble with this code
why not just
For RowNdx = LastRow To 1 Step -1
if ucase(Cells(RowNdx, "E"))< "HO" then cells(rowndx,"e").clearcontents
next
--
Don Guillett
SalesAid Software
"JOUIOUI" wrote in message
...
I'm not sure what is wroing with this code, my goal is to clear any text
in
Column E that does not match "HO". Any help is appreciated. Thanks
LastRow = Cells(Rows.Count, "E").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If StrComp(Cells(RowNdx, "E"), "HO", vbTextCompare) Then
Rows(RowNdx)ActiveCell.ClearContents
End If
Next RowNdx
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett