Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, it helps!
I really appreciate the help. I have to do some more experiments in Excel VB in the light of your directions. If I stuck somewhere, hopefully I will bother forum-participants again. Thank you very much! "MrShorty" wrote in message ... I wouldn't call myself an expert, but I did write (for myself) a handful of functions that return arrays (using Excel 2002). You've dimensioned the array to be one dimensional. In my experience, when a one-dimensional array is returned to Excel, Excel interprets it as a horizontal array. In this case, if you select a column of 12 cells (a vertical array) and array enter the array formula, Excel returns the 1st element of the horizontal array 12 times. If you select a row of 12 cells (a horizontal array), Excel will correctly return the horizontal array. I'm not sure the best workaround for this. The obvious solution to me at the time I was working with those UDF's was to dimension each array as 2 dimensional arrays: Either DIM aAd(12,1) to force Excel (and me, the programmer) to recognize a vertical array, or DIM aAd(1,12) to force me, the programmer to explicitly recognize that I'm working with a horizontal array. Some have also suggested using the TRANSPOSE worksheet function to transpose the horizontal array to a vertical array. Does that help? -- MrShorty ------------------------------------------------------------------------ MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181 View this thread: http://www.excelforum.com/showthread...hreadid=390837 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom functions | Excel Worksheet Functions | |||
efficiency: database functions vs. math functions vs. array formula | Excel Discussion (Misc queries) | |||
Using custom functions within custom validation | Excel Discussion (Misc queries) | |||
Custom Array Functions | Excel Programming | |||
Custom Functions in C/C++ against in VBA | Excel Programming |