N
norika
Hi,
I write macro to sum up dynamic range.
Dim rng As Range
Dim sumup As Double
Range("A1").Select
Set rng = Range(ActiveCell.Offset(1, 0), ActiveCell(1, 0).End(xlDown))
sumup = Application.Sum(rng)
But it cannot work.
The run-time error '1004' : application-defined or object-defined
error
How can i correct the error?
Also, how to write macro if the active cell was in the bottom of range?
Is it Set rng = Range(ActiveCell.Offset(-1, 0), ActiveCell(-1,
0).End(xlUp))
Thanks in advance.
Norika
I write macro to sum up dynamic range.
Dim rng As Range
Dim sumup As Double
Range("A1").Select
Set rng = Range(ActiveCell.Offset(1, 0), ActiveCell(1, 0).End(xlDown))
sumup = Application.Sum(rng)
But it cannot work.
The run-time error '1004' : application-defined or object-defined
error
How can i correct the error?
Also, how to write macro if the active cell was in the bottom of range?
Is it Set rng = Range(ActiveCell.Offset(-1, 0), ActiveCell(-1,
0).End(xlUp))
Thanks in advance.
Norika