一个Sheet1自触发
范围A1:B100
输入后自动减去666
Private Sub Worksheet_Change(ByVal Target As Range)
If Me.Name <> "Sheet1" Then Exit Sub
If Not Intersect(Target, Me.Range("A1:B100")) Is Nothing Then
If IsNumeric(Target.Value) Then
Application.EnableEvents = False
Target.Value = Target.Value - 666
Application.EnableEvents = True
End If
End If
End Sub