Sub Macro1() Dim i As Long i = 1 While ActiveCell.Offset(i, 0) <> "": i = 配友备i + 1: Wend ActiveCell.FormulaR1C1 = "=SUM(R[1]C:R[" & 培毁i - 1 & 告迅"]C)" End Sub
Sub 求和碧橡() Dim i As Long Dim x i = 1 Do While Cells(i, 1) <> "芹慧岩" x = Cells(i, 1) + x i = i + 1 Loop Range("C2") = x Range("C4"嫌御) = "sum(A1:A" & i - 1 & ")" End Sub