LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Custom Array Functions

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
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
Custom functions Palpha32 Excel Worksheet Functions 6 July 21st 08 12:36 AM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Using custom functions within custom validation Neil Excel Discussion (Misc queries) 4 December 14th 05 10:40 PM
Custom Array Functions Tim Williams Excel Programming 1 July 28th 05 11:07 AM
Custom Functions in C/C++ against in VBA agarwaldvk[_29_] Excel Programming 3 September 15th 04 03:31 PM


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