View Single Post
  #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.