Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim Thomlinson gave me the following code regarding a loop routine.
I also need to paste in two rows of text in from another sheet in the space created by inserting 3 rows (based on below) Would really appreciate your help. Kind regards, David Sub DeleteStuff() Dim rngToSearch As Range Dim rngFound As Range Dim strFirstAddress As String Set rngToSearch = Sheets("Sheet1").Columns("A") Set rngFound = rngToSearch.Find(What:="x", _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ MatchCase:=False) If rngFound Is Nothing Then MsgBox "Sorry nothin found" Else strFirstAddress = rngFound.Address Do rngFound.Offset(1, 0).Resize(3).EntireRow.Insert Set rngFound = rngToSearch.FindNext(rngFound) Loop Until rngFound.Address = strFirstAddress End If End Sub -- Thanks for your help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
For Each ... Next loop - need to reference the loop variable | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Loop Function unable to loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |