Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default Using Application.match against one dimension of a multidimensional array?

This probably has a simple answer (either simple syntax, or it simply can't
be done).

I am parsing one string to get a key value, TargetName ("Steve P. Jacobs").
I have another array [AllInfo(1 to 100, 1 to 5)] where AllInfo(x,1) holds
the name, and AllInfo(x,2) holds another variable, say, phone number, etc.

* AllInfo (x,1) is equivalent to a key field, i.e. there are no repeats.
* AllInfo is not sorted

What I'd like to do is (based on the string I parsed) locate the phone
number in AllInfo(x,2) associated with the record that has AllInfo(x,1)=
"Steve P. Jacobs"

When using a one dimensional array I used:
Application.Match(SourceString,MyOneDimensionalArr ayName,0)

but now I need to specify /which/ field in AllInfo(x,y) to check- so it
seems like it would be something like:
Application.Match(TargetName,(MyTwoDimensionalArra yName(,1),0)

but that doesn't seem to work... any advice? (other than switching to MS
Access, that is) :)

Thanks!
Keith


--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using Application.match against one dimension of a multidimensional array?

res = Application.Match(sName,Application.Index(AllInfo, 0,1),0)

AllInfo should have less than 5461 elements (which yours does).

Change the 1 to the column you want to check.

--
Regards,
Tom Ogilvy

"KR" wrote in message
...
This probably has a simple answer (either simple syntax, or it simply

can't
be done).

I am parsing one string to get a key value, TargetName ("Steve P.

Jacobs").
I have another array [AllInfo(1 to 100, 1 to 5)] where AllInfo(x,1) holds
the name, and AllInfo(x,2) holds another variable, say, phone number, etc.

* AllInfo (x,1) is equivalent to a key field, i.e. there are no repeats.
* AllInfo is not sorted

What I'd like to do is (based on the string I parsed) locate the phone
number in AllInfo(x,2) associated with the record that has AllInfo(x,1)=
"Steve P. Jacobs"

When using a one dimensional array I used:
Application.Match(SourceString,MyOneDimensionalArr ayName,0)

but now I need to specify /which/ field in AllInfo(x,y) to check- so it
seems like it would be something like:
Application.Match(TargetName,(MyTwoDimensionalArra yName(,1),0)

but that doesn't seem to work... any advice? (other than switching to MS
Access, that is) :)

Thanks!
Keith


--
The enclosed questions or comments are entirely mine and don't represent

the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.




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
Multidimensional Array DavidMoeller Excel Programming 4 August 12th 04 08:12 PM
Array transfer - 1 dimension v. 2 dimension JWolf[_2_] Excel Programming 2 June 29th 04 01:02 AM
MAX of Multidimensional Array ZZZ Excel Programming 2 November 15th 03 03:32 PM
Multidimensional Array problem I can't solve ! Please help me out ! David Van Heuverswyn Excel Programming 3 October 6th 03 01:49 PM
size of multidimensional dynamic array ThatFella[_2_] Excel Programming 4 September 3rd 03 11:53 PM


All times are GMT +1. The time now is 04:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"