Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2011, 04:30 PM
johnsmb johnsmb is offline Look up an array based on user input Windows XP Look up an array based on user input Office 2003
Novice
Look up an array based on user input
 
Join Date: Jan 2011
Posts: 2
johnsmb is on a distinguished road
Question 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?
Reply With Quote
  #2  
Old 01-06-2011, 08:51 PM
ConneXionLost's Avatar
ConneXionLost ConneXionLost is offline Look up an array based on user input Windows XP Look up an array based on user input Office 2003
Simulacrum
 
Join Date: Jan 2010
Location: Victoria, Canada
Posts: 86
ConneXionLost is on a distinguished road
Default

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)
Cheers,
Reply With Quote
  #3  
Old 01-07-2011, 01:12 PM
johnsmb johnsmb is offline Look up an array based on user input Windows XP Look up an array based on user input Office 2003
Novice
Look up an array based on user input
 
Join Date: Jan 2011
Posts: 2
johnsmb is on a distinguished road
Default Works like a charm

Thanks for the response, it worked great.
Reply With Quote
Reply

Tags
array, vlookup

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Look up an array based on user input 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
Look up an array based on user input 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft