Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a 2 dimensional string array variable like a lookup function
Hello all,
How would I use a 2 dimensional string array like a vlookup/hlookup? I'm thinking that my array will be something like this: dim pstrDestinationPath(0 to [n], 0 to 1) as string so in this 2 x [n] array, I will put a search term (a file name will be searched for this term) in the "first column" and the corresponding destination path in the "second column" of the array. what I'm thinking of right now is just using a For loop to loop through each element of the "first column" of the array, comparing it to a string. Then using the For Loop control counter (after the match is found) as the index for the "2nd column" of the array to return the matching path element. Is this the correct way of doing this, or is there some other more straight forward way? Thanks for any help anyone can provide, Conan Kelly |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lookup within a 2 dimensional array | Excel Worksheet Functions | |||
Export 1-dimensional array values to a two-dimensional table? | Excel Programming | |||
Variable Table Array in Lookup Function | Excel Worksheet Functions | |||
2 dimensional array and freq function? | Excel Programming | |||
Filter Function for 2-dimensional array | Excel Programming |