Hi
I have the macro shown below that adds a row when the word "ticket control number" appears in column S.
What im trying to do is amend it so that at every change of number in column "X" it adds a row instead.
Any Ideas?
Thanks
Sub ControlRow()
Dim lastRw As Long, nxtRw As Long
'Determine last row with data in Column S
lastRw = Cells(Rows.Count, "S").End(xlUp).Row
'Check each Cell in S, Insert row after each Ticket Control No.
For nxtRw = lastRw To 1 Step -1
If Cells(nxtRw, "S") = "Ticket Control No." Then
Rows(nxtRw + 1).EntireRow.Insert
End If
Next
'
End Sub
I have the macro shown below that adds a row when the word "ticket control number" appears in column S.
What im trying to do is amend it so that at every change of number in column "X" it adds a row instead.
Any Ideas?
Thanks
Sub ControlRow()
Dim lastRw As Long, nxtRw As Long
'Determine last row with data in Column S
lastRw = Cells(Rows.Count, "S").End(xlUp).Row
'Check each Cell in S, Insert row after each Ticket Control No.
For nxtRw = lastRw To 1 Step -1
If Cells(nxtRw, "S") = "Ticket Control No." Then
Rows(nxtRw + 1).EntireRow.Insert
End If
Next
'
End Sub