Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default UDF returning a 2 dimentional array

A real question this time ...

I would like to write a user defined function which will return a 2
dimensional array of values based on the value of a supplied parameter
but having searched the net I am still at a loss as to how to do it -
can anyone help?

Intuitively, although I know this is wrong, I would like to define a
function something like ...

Public Function Arr(2,10)(byval Param as Long) as Variant

.... where (2,10) are the dimensions of the array and Param is the
supplied decision parameter.

If the syntax is corrected can this be done??

As a supplementary: if this can be achieved, can Arr be redimensioned
within the function to return a bespoke array without blank fields or
must the original size of Arr be generic and oversized in order to
cater for all cases?

Regards,

Alan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default UDF returning a 2 dimentional array

You posted this question a couple fo days ago. Check your responses their...
--
HTH...

Jim Thomlinson


"Alan" wrote:

A real question this time ...

I would like to write a user defined function which will return a 2
dimensional array of values based on the value of a supplied parameter
but having searched the net I am still at a loss as to how to do it -
can anyone help?

Intuitively, although I know this is wrong, I would like to define a
function something like ...

Public Function Arr(2,10)(byval Param as Long) as Variant

.... where (2,10) are the dimensions of the array and Param is the
supplied decision parameter.

If the syntax is corrected can this be done??

As a supplementary: if this can be achieved, can Arr be redimensioned
within the function to return a bespoke array without blank fields or
must the original size of Arr be generic and oversized in order to
cater for all cases?

Regards,

Alan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default UDF returning a 2 dimentional array

Sorry Jim but as I have said elsewhere my system has been playing up
and I couldn't actually locate the thread. Things seem to be improving
but I still have problems. According to my profile the last time I was
active in this group was back in April!!

Alan

You posted this question a couple fo days ago. Check your responses their...
--
HTH...


Jim Thomlinson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default UDF returning a 2 dimentional array

Dana,

I created the macro this morning and achieved just what I wanted
thanks to your input.

Alan

Reply
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
UDF returning a 2 dimentional array Alan Excel Programming 11 July 21st 07 08:31 AM
UDF returning a 2 dimentional array Alan Excel Programming 0 July 18th 07 05:57 PM
How to convet two dimentional data into one dimentions Kiran Veeramallu Excel Worksheet Functions 2 March 8th 07 04:03 PM
Returning an array from a multi-dimensional array Chris Excel Programming 2 January 3rd 07 06:01 AM
How to program a three dimentional table in excel pantelis Excel Programming 3 August 23rd 03 01:43 AM


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