Hello RAH,
Here is the macro that has been added to your original workbook. The Validation drop down list contains 2 additional entries: a blank and "Add a Line".
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastCol As Long
Dim R As Long
Dim vt As Long
On Error Resume Next
vt = Target.Validation.Type
If Err.Number = 1004 Then
Err.Clear
End If
On Error GoTo 0
Application.EnableEvents = False
R = Target.Row
With ActiveSheet.UsedRange
LastCol = .Columns.Count + .Column - 1
End With
If vt = xlValidateList And Cells(R, "A") = "Add a Line" Then
Target.Offset(1, 0).EntireRow.Insert Shift:=xlDown
Range(Cells(R, "B"), Cells(R + 1, LastCol)).FillDown
End If
Application.EnableEvents = True
End Sub
Sincerely,
Leith Ross
Bookmarks