LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Optional Arguments in Custom Fuctions

I am trying to build a custom function and could use some advice. There is
more to it than this, but at the core what I am trying to do is a custom sum
function that lets you put any number of cell references in the formula.

This is a very simplified version, but if I can get this to work, then I can
get the rest to work.

Thanks in advance


Function MySum(Range1, Optional Range2, Optional Range3, Optional Range4)

For X = 1 to 4
if ismissing(RangeX) then Exit Function Else MySum = MySum +
Cells(RangeX.Row, RangeX.Column)
Next X
 
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
Optional arguments and IsMissing pinkfloydfan Excel Programming 2 March 18th 07 11:00 PM
Passing Constant Arguments to custom Subroutine & Functions cLiffordiL Excel Programming 6 June 21st 06 09:17 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Representation of optional parameters in Function arguments window compound[_5_] Excel Programming 0 January 17th 06 11:32 PM
Custom functions using arguments with same name Spencer Hutton Excel Programming 5 May 27th 05 06:34 PM


All times are GMT +1. The time now is 05:16 AM.

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"