Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Long, c As Integer, NextLineValue As Variant
Dim NR As Long, F As Range
r = Target.Row
c = Target.Column
If c = 1 Then
Application.EnableEvents = False
NextLineValue = Cells(r + 2, c)
If NextLineValue = "Total" Then
Rows(r + 1).Insert
End If
Application.EnableEvents = True
ElseIf c = 9 And IsDate(Target.Value) Then
Set F = Sheets("Master").Columns("H").Find(what:=Range("H" & Target.Row).Value, LookIn:=xlValues, lookat:=xlWhole)
If F Is Nothing Then
NR = Sheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1).Row
Else
NR = F.Row
End If
Target.EntireRow.Copy Destination:=Sheets("Master").Range("A" & NR)
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Long, c As Integer, NextLineValue As Variant
Dim NR As Long, F As Range
r = Target.Row
c = Target.Column
If c = 1 Then
Application.EnableEvents = False
NextLineValue = Cells(r + 2, c)
If NextLineValue = "Total" Then
Rows(r + 1).Insert
End If
Application.EnableEvents = True
ElseIf c = 9 And IsDate(Target.Value) Then
Set F = Sheets("Priorisk").Columns("H").Find(what:=Range("H" & Target.Row).Value, LookIn:=xlValues, lookat:=xlWhole)
If F Is Nothing Then
NR = Sheets("Priorisk").Range("A" & Rows.Count).End(xlUp).Offset(1).Row
Else
NR = F.Row
End If
Target.EntireRow.Copy Destination:=Sheets("Priorisk").Range("A" & NR)
End If
End Sub