View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_3_] Alan Beban[_3_] is offline
external usenet poster
 
Posts: 130
Default Multidimensional Arrays - VBA

If the functions in the downloadable file at
http://home.pacbell.net/beban are available to your workbook

arr = ArrayMatch("Fish", MyArray)
MsgBox Application.Index(MyArray, arr(1, 1), arr(1, 2) + 1)

This will return the value from the "column" of the array immediately to
the "right" of the first occurrence of "Fish" in MyArray.

Alan Beban

Brent McIntyre wrote:
Tom,

Thanks very much for your help, but I think I have confused everyone,
including myself.

What I want to do is create a virtual table via an array of 151 rows and
6 columns.

I have worked out the whole thing of writing in the array, ie setting up
the virtual table, but I am not sure how to access it, I need to be able
to get a certain value, check whether it appears in a certain column and
if it does display the information from another column.

ie

Virtual Table
One Cat Apartment
Two Fish House
Three Cow Flat

And if the read in value is "Fish" I want it to output "House"

I hope this makes it all a bit more clear.

Thank you all for your help it is much appreciated, this is my first
time using Multidimensional Arrays.

Yours sincerely,

Brent McIntyre

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!