Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Mar 16, 1:32*pm, "Bob Phillips" wrote:
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.- Hide quoted text - - Show quoted text - Thanks Bob. It really worked. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try
Dim xsum As Variant i1 = 10 i2 = 100 x = Application.Sum(Range(Cells(i1, "A"), Cells(i2, "A"))) -- Jacob "Subodh" wrote: 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. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLookup multiple values - sum returned values into single cell | Excel Worksheet Functions | |||
Copy values from a cell based on values of another cell | Excel Discussion (Misc queries) | |||
How to assign values to a cell based on values in another cell? | Excel Worksheet Functions | |||
Replacing Linked Cell Values w/ Current Values | Excel Worksheet Functions |