Quote:
Originally Posted by Purfleet
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
|
20201004174248.png
thanks for your help!
I have some questions about this code:
1.Range("a15:j15") = "=sum(a1:a14)" I don't understand the meaning of the code,what's the use of this method of sum?
2.This code does not calculate the sum of all the total data in row 15 and put it in cell K15. How to solve it?