As long as the rows and columns are static, you just need to do a sum formula in the range without the fixed references
Sub sumtheall()
Columns("k:k").ClearContents
Rows("15:15").ClearContents
Range("a15:j15") = "=sum(a1:a14)"
Range("k1:k14") = "=Sum(a1:j1)"
End Sub
Last edited by Purfleet; 10-04-2020 at 02:36 AM.
Reason: typo
|