Thread: Loop
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Esau Esau is offline
external usenet poster
 
Posts: 2
Default Loop

How do I stop this after the last life o I am new and not very good at thi

Sub life_o(
Range("A1:A8000").Selec
D

Set FoundCell = Cells.Find(What:="life o", After:=ActiveCell,
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns,
SearchDirection:=xlNext, MatchCase:=False
If FoundCell Is Nothing The
Els
FoundCell.Offset(0, 1).Selec
End I
FoundCell.Offset(0, 1).Selec
ActiveCell.Value = "1
ActiveCell.Offset(0, -1).Selec
Loop Until FoundCell Is Nothin
End Sub