Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Defined Functions | Excel Worksheet Functions | |||
User Defined Functions | Excel Worksheet Functions | |||
user defined functions | Excel Programming | |||
excel functions and User defined functions | Excel Programming | |||
User Defined Functions | Excel Programming |