Thread: Looping
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Murph[_2_] Murph[_2_] is offline
external usenet poster
 
Posts: 16
Default Looping

Hi Gurus
I am attempting to loop some simple code that goes down a Column A, finds
the start of a new series of up to 24 consecutive numbers, inserts two blank
rows and then continues down the next series and repeats the process.
My problem is that when it reaches the last of the series it goes back to
the start and keeps going.
Can a respondent tidy up my simple macro?
"Do
Range("Start").Select
Cells.Find(What:="01", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlDown,
MatchCase:= _
True).Activate
ActiveCell.Range("a1").Select
ActiveCell.EntireRow.Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.End(xlDown).Select


Loop"

With thanks
Murph