Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create Function like Sum()

Dear All,

Has anyone ever create function like sum() which have parameter in
range? What's parameter type should be used?

Thanks for the help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Create Function like Sum()

Public Function MySum(rng as Range) as Double
Dim tot as Double
Dim cell as Range
for each cell in rng
if isnumeric(cell) then
tot = tot + cell.Value
end if
MySum = Tot
End Function

Would be a simple implementation. The correct answer depends on exactly
what you want the function to be able to do.



--
Regards,
Tom Ogilvy



"Yap Michael" wrote in message
...
Dear All,

Has anyone ever create function like sum() which have parameter in
range? What's parameter type should be used?

Thanks for the help



Reply
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
How to create function to look up the value TT Excel Discussion (Misc queries) 0 April 27th 09 07:54 AM
not sure how to create this function dilbert16588 Excel Worksheet Functions 1 March 8th 08 05:24 PM
how to create function bsatstudent5 Excel Worksheet Functions 2 January 29th 07 02:38 PM
How to create a function galsaba Excel Worksheet Functions 2 January 29th 07 11:29 AM
How do I create a function into function list? Hossein Farhani Excel Programming 2 April 23rd 05 06:19 PM


All times are GMT +1. The time now is 02:56 PM.

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

About Us

"It's about Microsoft Excel"