Hi I have a loop macro that doesn't work fully.
If I dont get one or two empty cells at the end of the selection I get:
Object variable or With block variable not set (Error 91).
It loops ok, but I know the exit loop is flawed, it should loop through each cell in the range and stop.
Here is the macro:
Sub DeletePercent()
'
' Macro 02/04/2007
'
Dim LastRow As Long
LastRow = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
Range("J2:J" & LastRow).Select
Do Until IsEmpty(ActiveCell) And IsEmpty(ActiveCell.Offset(1, 0))
Selection.Find(What:="%", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ActiveCell.Value = ""
Loop
End Sub
The data looks like:
Arrangement £1999,
Arrangement 1.50% Advance,
Arrangement £1999,
Arrangement £1999,
Arrangement 1.50% Advance,
Arrangement 1.50% Advance,
Arrangement 2.50% Advance (Min £599.00),
Arrangement 2.00% Advance (Min £599.00),
Arrangement 1.50% Advance (Min £599.00),
Arrangement £599,
Arrangement 1.50% Advance (Min £599.00),
Arrangement £599,
Arrangement 1.50% Advance (Min £599.00),
Arrangement £599,
Arrangement £599,
Arrangement 0.75% Advance (Min £599.00),
I want to get rid of the % data, thats it.
Bookmarks