Any Help with a Simple Function?
"Jacob G" wrote in message
...
The last statement below, One Line above the End Sub is where I can't get it
to work.
Sub Count_Cases1()
Range("M5").Select
Do
ActiveCell.Value = Abs(Selection.Offset(0, -1))
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(Selection.Offset(0, -1))
ActiveCell = Sum (Range("M5", ActiveCell.Offset(-1,0)))
End Sub
Hi Jacob
you have already soleved your problem by Rowan. so, you may don't need this any
more.
But how about changing above the line
ActiveCell = Sum (Range("M5", ActiveCell.Offset(-1,0)))
to
ActiveCell = Application.Sum(Range("M5", ActiveCell.Offset(-1, 0)))
or
ActiveCell.Formula = "=sum(M5:" & ActiveCell.Offset(-1, 0).Address(False, False) &
")"
keizi
|