thestampdad
Technical User
- Nov 2, 2001
- 14
Below is part of a macro I have in Excel which is stuck in a loop.
How do I stop the loop once the last cell has been found and dealt with? I would like the macro to automatically continue without any manual intervention.
keep_going:
Cells.Find(What:=" Total", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.End(xlToRight).Select
Selection.Font.Bold = True
ActiveCell.Offset(-1, -3).Activate
Selection.Font.Bold = True
ActiveCell.Offset(1, 3).Activate
GoTo keep_going
Thank you for any help you can provide.
Dave.
How do I stop the loop once the last cell has been found and dealt with? I would like the macro to automatically continue without any manual intervention.
keep_going:
Cells.Find(What:=" Total", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.End(xlToRight).Select
Selection.Font.Bold = True
ActiveCell.Offset(-1, -3).Activate
Selection.Font.Bold = True
ActiveCell.Offset(1, 3).Activate
GoTo keep_going
Thank you for any help you can provide.
Dave.