I need to insert a new row after each row that begins with SPL in column A. In this sheet it happens to be every other row. But I do have a couple of other sheets where it isn't every other row.
Last edited by lisach; 02-03-2012 at 08:54 PM.
Hi Iisach,
Here is some code that will do what you want.
Sub NewRowAfterSPL() Dim LastRow As Double LastRow = Cells(Rows.Count, "A").End(xlUp).Row Dim RowCtr As Double For RowCtr = 1 To LastRow If Left(Cells(RowCtr, "A"), 3) = "SPL" Then Rows(RowCtr + 1).Insert RowCtr = RowCtr + 1 End If Next RowCtr End Sub
One test is worth a thousand opinions.
Click the * below to say thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks