Ich möchte eine Spalte mit Zahlen addieren, aber da die Zeilenanzahl variabel ist, weiß ich nicht wie ich das anstellen soll.
Sub test()
MsgBox WorksheetFunction.Sum(Range("E:E"))
End Sub
Hilft dir das weiter?
Sub test()
Dim lz As Long
lz = Range("E65536").End(xlUp).Row
Cells(lz + 1, 5) = WorksheetFunction.Sum(Range("E1:E" & lz))
End Sub
Sub Summe()
Range("H1").Select
ActiveCell.FormulaR1C1 = "=SUM(C[-3])"
End Sub