View Full Version : Vlookup help

2011-03-31, 05:28 PM
Just started using the vlookup function and I am trying to put in a toggle between two names and then use the name in a vlookup function to return a value from a table. I've never used forms control and the documentation on list boxes or combo boxes is not very helpful.

Any suggestions?

Ken Puls
2011-03-31, 08:50 PM
Hi there, and welcome to the forum!

It sounds like you're stuck on the portion of trying to make sure the users are selecting valid options, rather than actually making the VLOOKUP work right now?

Form controls can work (I have a basic article on using them here (http://www.excelguru.ca/node/94)), and can certainly help you with implementing any of them.

Personally, though, I actually like using data validation lists in many cases. (Data-->Data Validation). Set up a list, and point it to a range of valid options.

I've attached an example using a Data Validation list to drive a VLOOKUP for you. Let me know if you would like any help in adapting it to your situation, or if you'd like to pursue form controls instead.

Ken Puls
2011-04-01, 05:46 PM
Brian emailed me directly, and he is trying to work out how to get the data validation list completed. So in the example file I built:

Select the cell where you want the drop-down to appear (in this case B5)
Go to Data->Data Validation (if I recall correctly this is true in all versions of Excel)
Set "Allow" to "List"
Set "Source" to the range that contains the list (in this case =$E$6:$E$8)
Make sure "In-cell dropdown" is checked
Click OK
A drop down arrow will appear when you select B5, and you should be able to pull from the list. :)

Hope it helps,