To sum the values of the cell
Try
x = Application.Sum(Range(Cells(i1, "A"), Cells(i2, "A")))
--
HTH
Bob
"Subodh" wrote in message
...
I want to sum up the values of cells using VBA.
Lets say from Range A10 to A100 and make it as a vary.
Also, the rows 10 and 100 are supplied by the user.
However, the follwing does not work
Dim xsum as long
i1=10
i2=100
x = sum(cells("A(i1):A(i2)")
does not works.
Can anyone help?
Thanks in advance.
|