如何在Excel一个单元格里输入一个数字后,它自动变成一个公式计算后的结果?

360U3397863114 |浏览794次
收藏|2022/09/28 09:05

满意回答

2022/09/28 09:26

Private Sub Worksheet_Change(ByVal Target As Range)Dim n%On Error GoTo 100***.enableevents = FalseIf ***.column = 1 And ***.offset(0, 1) <> "" _ And ***.isnumber(***.offset(0, 1) * 1) Thenn = MsgBox("用加法请按“回车或Y”" & Chr(10) & _ "用乘法请按“N”", vbYesNo)If n = 6 ThenTarget = Target + ***.offset(0, 1)ElseTarget = Target * ***.offset(0, 1)End IfEnd If100***.enableevents = TrueEnd Sub

突突兔2019

其他回答(0)
0人关注该问题
+1

 加载中...