#1
|
|||
|
|||
Look up an array based on user input
Does anyone know if it is possible to look up a value in a named array based on a user input? I have a series of arrays that have been named and will be used to look up values. I want the user to enter the name of the array they want to use and then let Excel look up the value from the proper array. Using VLOOKUP I can enter the name of the array manually and it works (VLOOKUP(B25,test,8) where test is the name of the array). But if I want the user to enter the array to use (in place of "test" in the example) it blows up. My hope would be to have the user select the array they want from a list and use the result to pull the value from the proper array. Any ideas?
|
#2
|
||||
|
||||
If your user places the name of the chosen array in cell A2, then use the INDIRECT function within your VLOOKUP function like this:
Code:
=VLOOKUP(B25,INDIRECT(A2),8) |
#3
|
|||
|
|||
Works like a charm
Thanks for the response, it worked great.
|
Tags |
array, vlookup |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manual input to a slide show | morrisg | PowerPoint | 3 | 11-23-2010 11:03 AM |
outlook programmatically read an attachment into byte array | chriskaza81 | Outlook | 0 | 11-19-2010 01:03 AM |
Array into ComboBox + Macro-Text into ActiveDocument | Vivi | Word VBA | 1 | 01-27-2010 07:03 AM |
Right-to-Left text wrapping/input issues | Chaptain | Word | 0 | 12-16-2009 03:24 PM |
Creating A Input Or Output Field | skoz55 | Excel | 0 | 08-15-2009 04:40 PM |