Hi,
I have the following code which searches for a partial string. It works fine until it doesn't find a match, then I receive an error. I have it loop until the activecell.value is "End", but because I'm searching for "Total*" it never finds the value to end the loop.
Do Until ActiveCell.Value = "End"
Cells.Find(What:="TOTAL*", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ActiveCell.Rows("1:1"
.EntireRow.Select
Selection.Delete Shift:=xlUp
ActiveCell.Offset(1, 0).Range("A1"
.Select
Loop
Any Suggestions would be greatly appreciated.
I have the following code which searches for a partial string. It works fine until it doesn't find a match, then I receive an error. I have it loop until the activecell.value is "End", but because I'm searching for "Total*" it never finds the value to end the loop.
Do Until ActiveCell.Value = "End"
Cells.Find(What:="TOTAL*", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ActiveCell.Rows("1:1"
Selection.Delete Shift:=xlUp
ActiveCell.Offset(1, 0).Range("A1"
Loop
Any Suggestions would be greatly appreciated.