Forum Discussion
Tommee
May 24, 2023Copper Contributor
Adding a column of cell numeric values to total within an excel macro.
Hello. I've tried to find on the web how to add cell numbers to a counter in an excel macro but can't find any examples. I've tried defining the total field: DIM integer, long, double, variable. I'...
XXplore
May 24, 2023Brass Contributor
Your code "For Cellrow = 5 To 104" starts from J5 which is 30 ...
And I would suggest use formular instead of marco, or
Range("J105") = Application.WorksheetFunction.Sum(Range("J5").Resize(100, 1))
And I would suggest use formular instead of marco, or
Range("J105") = Application.WorksheetFunction.Sum(Range("J5").Resize(100, 1))