Private Sub Worksheet_Change(ByVal Target As Range)
Call script1(Target)
Call script2(Target)
Call script3(Target)
Call script4(Target)
End Sub
--------------------------------------------------------------
Private Sub script1(ByVal Target As Range)
If Target.Cells.Address = "$M$9" Then
If [M9] >= [P9] * 0.01 Then
[L9] = [M9] / [M9] + [L9]
End If
End If
End Sub
------------------------------------------------------------------
Private Sub script2(ByVal Target As Range)
If Target.Cells.Address = "$M$10" Then
If [M10] >= [P10] * 0.01 Then
[L10] = [M10] / [M10] + [L10]
End If
End If
End Sub
--------------------------------------------------------------------
Private Sub script3(ByVal Target As Range)
If Target.Cells.Address = "$M$11" Then
If [M11] >= [P11] * 0.01 Then
[L11] = [M11] / [M11] + [L11]
End If
End If
End Sub
---------------------------------------------------------------------
Private Sub script4(ByVal Target As Range)
If Target.Cells.Address = "$M$12" Then
If [M12] >= [P12] * 0.01 Then
[L12] = [M12] / [M12] + [L12]
End If
End If
End Sub作者: GBKEE 時間: 2018-1-2 07:48