#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default HELP!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default HELP!

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"