Hi all,
I want to calculate (sum) a range using VBA, its part of a bigger programme, however I cannot get it working.
Trying variety of ways including
'want to paste the total to cell a6
range(a6).paste
This is the basic idea. However, I'm working between worksheets/workbooks. Do I need to declare a varaible to store? I tried this and
but did not work
Went through a few RTMs and could not find a clear solution to the problem.
Any guidence on this?
Thanks Lawdie
I want to calculate (sum) a range using VBA, its part of a bigger programme, however I cannot get it working.
Trying variety of ways including
Code:
'trying to add each cell value
range (a1:a5).select
selection.calculate.copy
range(a6).paste
This is the basic idea. However, I'm working between worksheets/workbooks. Do I need to declare a varaible to store? I tried this and
Code:
set myvarible = range(a1:a5).calcuate
Went through a few RTMs and could not find a clear solution to the problem.
Any guidence on this?
Thanks Lawdie