眼前只做到同步客戶編號
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Count = 1 Then
If Left(Target.Value, 1) = "F" Then
intRow = Me.Range("A65536").End(xlUp).Row
rng = Me.Range("A1:A" & intRow)
For i = 1 To intRow
If Left(rng(i, 1), 1) = "F" Then
intRow1 = Target.Row - i + 1
If intRow1 < 1 Then
intRow1 = 1
End If
Application.EnableEvents = False '關掉觸發事件
Sheet12.Rows(intRow1 + 2).Insert Shift:=xlDown
Sheet12.Range("A" & CStr(intRow1 + 1)).Value = Target.Value
Application.EnableEvents = True '恢復觸發事件
Exit Sub
End If
Next i
End If
End If