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 user defined functions

Hello:

I have a nested function that is uncomfortably long for typing:

=SUMPRODUCT(SUMIF(INDIRECT("'" & wslist & "'!A1"),"<0",INDIRECT("'"&
wslist & "'!A1")))

As is, the function applies to the A1 cell. If I wish to use it with
another cell, say C3, (but the same wslist) I would type

=SUMPRODUCT(SUMIF(INDIRECT("'" & wslist & "'!C3"),"<0",INDIRECT("'"&
wslist & "'!C3")))

Is it possible to define a function, e.g. MySum(cell) such that the
above examples would reduce to MySum(A1) and MySum(C3), respectively?

I was advised on another group of a great replacement

=SUMPRODUCT(SUMIF(INDIRECT("'" & wslist & "'!" &
ADDRESS(ROW(A1),COLUMN(A1),4)),"<0",INDIRECT("'"& wslist & "'!" &
ADDRESS(ROW(A1),COLUMN(A1),4))))

which proves that being longer is not necessarily being less amenable to
typing, for it now can be copied and pasted. Still, if it were possible
to use a simple name like MySum for the whole expression it would be
less intimidating.

Thank you,
Alex
 
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 Mike McLellan Excel Worksheet Functions 2 May 4th 06 10:56 AM
User Defined Functions Frank@shell Excel Worksheet Functions 3 April 20th 05 02:41 PM
user defined functions Basil Excel Programming 3 June 29th 04 04:59 PM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM
User Defined Functions Ron Bishop[_2_] Excel Programming 0 November 20th 03 04:20 PM


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