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: 709
Default User defined functions that are array functions

I need to repeatly use some complicated array functions.
For example, this function which calculates conditional sums and only
returns a value if it is positive:
=IF(SUM(IF(From=$E3,IF(To=H$1,Cost,0),0))-SUM(IF(From=H$1,IF(To=$E3,Cost,0),0))<0,"",SUM(IF( From=$E3,IF(To=H$1,Cost,0),0))-SUM(IF(From=H$1,IF(To=$E3,Cost,0),0)))

Of course, after I enter this formula I have to hit Ctrl + Shift + Enter

Is there a way to convert this into a user defined function like:

Public Function ConditionalSum(Column1Values, Column2Values, Column3Values)

...
...
End Function


--
Richard
 
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
User Defined Functions MoTrekker Excel Discussion (Misc queries) 2 November 8th 09 06:36 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM
Array as Argument in User-Defined Functions Tushar Mehta Excel Programming 0 May 19th 04 04:29 AM
Array as Argument in User-Defined Functions Harlan Grove[_5_] Excel Programming 0 May 18th 04 10:30 PM


All times are GMT +1. The time now is 06:12 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"