LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 04:51 PM
COM Add-in - Simple Function Rasmus A Excel Programming 1 September 28th 05 02:25 PM
simple if then function amy Excel Worksheet Functions 4 July 6th 05 05:36 PM
Simple Function Help ~ Please Avram Berman Excel Worksheet Functions 9 November 19th 04 11:01 PM
A simple function Bob Grossman Excel Programming 5 August 30th 03 10:21 AM


All times are GMT +1. The time now is 04:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"