![]() |
#3
|
||||
|
||||
![]()
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 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] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro Needed to bold specific lines and Macro to turn into CSV | anewteacher | Word VBA | 1 | 05-28-2014 03:59 PM |
![]() |
msworddave | Word | 1 | 05-08-2013 02:00 AM |
Linking: Insert > Pictures to a specific folder location | hockfam | PowerPoint | 0 | 11-08-2012 08:09 PM |
Match two sets of data and display specific data | lolly150 | Excel | 1 | 05-14-2012 10:33 PM |
Insert an item to excel specific cell | apjneeraj | Excel | 0 | 01-18-2011 03:39 AM |