In each row of a spreadsheet, I need to simultaneously calculate three different values based on values in that row. A UDF seems like the proper way to go, something like =MYFunc(a,b,c). However, a function can only return a single value. I have "solved" my problem in an inelegant way, namely =MyFunc1(a,b,c), Myfunc2(a,b,c), Myfunc3(a,b,c), where each function is in its own column/cell. There must be a simpler way! To be clearer, the arguments a,b,c are not the values that are calculated by the function. I need to do this in multiple rows.
Any suggestions are welcome. Thanks in advance.
Last edited by Econdoc1; 06-23-2010 at 07:37 AM. Reason: Request by Forum manager
Welcome to the forum.
Please take a few minutes to read the forum rules, and then amend your thread title accordingly.
Thanks.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
You could return an array, something like
SO you select three cells, say M1,N1 and O1, enter =MyFunc() in the formula bar, and array enter it.Public Function myFunc() myFunc = Array(1, 2, 3) End Function
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks