I need help modifying the code below. I know this should be easy but I have very little experience with VBA. What I want to do is change the code to evaluate a column with the header "jobnbr" instead of “column A” in my worksheet. The column may change locations in my worksheet but the header should always be "Jobnbr". <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Thank you, Gabe
Sub InsertRow_On_Chg_ColumnA()
Dim Lrow As Long, vcurrent As String, i As Long
'// find last used cell in Column A
Lrow = Cells(Rows.Count, "A").End(xlUp).Row
'// get the value of that cell in Column A (column 1)
vcurrent = Cells(Lrow, 1).Value
'// rows are inserted by looping from bottom up
For i = Lrow To 2 Step -1 'Stop Loop at Row # 2
If Cells(i, 1).Value <> vcurrent Then
vcurrent = Cells(i, 1).Value
Rows(i + 1).Resize(8).Insert 'Resize(8) to Insert Eight Blank Rows
End If
Next i
End Sub<o></o>
<o></o>
Thank you, Gabe
Sub InsertRow_On_Chg_ColumnA()
Dim Lrow As Long, vcurrent As String, i As Long
'// find last used cell in Column A
Lrow = Cells(Rows.Count, "A").End(xlUp).Row
'// get the value of that cell in Column A (column 1)
vcurrent = Cells(Lrow, 1).Value
'// rows are inserted by looping from bottom up
For i = Lrow To 2 Step -1 'Stop Loop at Row # 2
If Cells(i, 1).Value <> vcurrent Then
vcurrent = Cells(i, 1).Value
Rows(i + 1).Resize(8).Insert 'Resize(8) to Insert Eight Blank Rows
End If
Next i
End Sub<o></o>