I missed that part. Sorry.
![]()
Sub Routers() Dim Found As Range, FirstFound As String, counter As Long Application.ScreenUpdating = False Set Found = Range("A:A").Find(What:="primary ""igp""", _ LookIn:=xlValues, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not Found Is Nothing Then FirstFound = Found.Address Do If InStr(1, Found.Offset(1), "Adaptive", 1) = 0 Then Found.Offset(1).Insert Shift:=xlShiftDown Found.Offset(1).Value = "adaptive" counter = counter + 1 End If Set Found = Range("A:A").FindNext(After:=Found) Loop Until Found.Address = FirstFound End If Application.ScreenUpdating = True MsgBox counter & " rows inserted. ", vbInformation, "Adaptive Inserts Complete" End Sub
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks