View Single Post
 
Old 09-15-2014, 01:48 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,384
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

An alternative approach:
Code:
Sub InsertRows()
Dim lRow As Long, i As Long
With ThisWorkbook.Worksheets("Sheet1").UsedRange
  For i = .Cells.SpecialCells(xlCellTypeLastCell).Row To 1 Step -1
    If .Range("G" & i).Value = "1410.01" Then
       While .Range("G" & i + 1).Value <> ""
          .Range("G" & i + 1).EntireRow.Insert
       Wend
     End If
  Next
End With
End Sub
This approach ensures there is only one blank row (i.e. it won't insert one if there already is one).

Note: The code assumes the "1410.01" is in column G. Change the 'G' in the three '.Range("G"' references to suit.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote