Thread: Custom Function
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JAdamJ
 
Posts: n/a
Default Custom Function

Function mySum(myRange As Range)
mySum = 0

For Each c In myRange
mySum = mySum + c.Value
Next

End Function


"SPeterson" wrote:

I am creating a custom function and want one of my arguments to be a range.
For example, the sum function accepts a range argument (=Sum(range)). How
does the Sum function define that range argument? Fill in the blank for me
and it should help me with my problem.

Function Sum(???)

Sum = ???

End Function