Wednesday, October 30, 2019

Worksheet_Change

Private Sub Worksheet_Change(ByVal Target As Range)
r = Target.Row
c = Target.Column
If c <> 1 Then Exit Sub
Application.EnableEvents = False
NextLineValue = Cells(r + 2, c)
If NextLineValue = "CFO" Then
Rows(r + 1).Insert
End If
Application.EnableEvents = True
End Sub