
VBA
D1输入=B1-C1向下拉四行即可,注意只用四行。也就是拉到D5就行了。以后BC列,输入内容,D列自动添加公式这也觉得麻烦的话,你只能用
VBA了。感觉不值当的。
工作表事件Private Sub Worksheet_Change(ByVal Target As Range) i = Target.Row If Application.Intersect(Target, [B:C]) Is Nothing Then Exit Sub Cells(i, 4) = Cells(i, 2) -Cells(i, 3)End Sub