catharinez
幼苗
共回答了28个问题采纳率:82.1% 举报
'比如在sheet1中有如你所述的原表
'则打开VBE的sheet1代码编辑窗口,将如下代码复制进去
Private Sub 填充公式()
Dim i As Integer
For i = 1 To 10000 Step 1
If Sheet1.Cells(i, 1) "" And Sheet1.Cells(i, 4) "=SUM(B" & i & ":C" & i & ")" Then
Sheet1.Cells(i, 4) = "=SUM(B" & i & ":C" & i & ")"
End If
Next i
End Sub
'运行即可
1年前
10