怎么设置excel表格A2单元格为A1数字之和,A3单元格为A1单元格之和

2025-03-26 00:36:30
推荐回答(1个)
回答1:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "A1" Then
If VBA.IsNumeric([a1]) Then
Application.EnableEvents = False
[a2] = [a2] + [a1]
[a3] = [a3] + [a1]
Application.EnableEvents = True
End If
End If
End Sub