Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to make a macro that will find "-+-", then delete the
entire row and do this process again & again until all the rows with "-+-" are deleted in the worksheet. I managed to make a macro that will do the find & delete ONCE but I don't know how to make the macro keep going in a loop until it can't find anymore. Can anyone help me please? Thanx |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Sub Macro1( Range("A1").Select ' Right at the to While Err.Number = On Error GoTo L ActiveSheet.Cells.Find(What:="-+-", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) .Activat ActiveSheet.Rows(Selection.Row).Delet Wen L0: Exit Su End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|