How to combine Combo Box function with Vlookup function
You can use a couple of cells to get the value from the DropDown (from the Forms
toolbar).
If you rightclick on that dropdown, then choose Format Control, you can go to
the control tab and assign a linked cell (in an out of the way location--or even
a hidden worksheet).
But this linked cell returns an index into that list.
You can use a formula like this to return the value:
(say in B1)
=if(a1="","",index(sheet2!a:a,a1,0))
Where A1 is the linked cell and sheet2 column A contains the list for the
dropdown.
Then you can use this hidden cell in your =vlookup()
=if(b1="","",vlookup(b1,sheet99!a:e,5,false)
But depending on what you're returning and how you're using it in the =vlookup()
formula, you may need to use =indirect() (say you're returning the worksheet
name that contains the table for the =vlookup():
=if(b1="","",vlookup(x999,indirect("'"&b1&"'!a:e") ,5,false)
KH wrote:
I have many items to input into my selection list in my worksheet. Hence, I
came up with the Combo Box (from FORM under Toolbars) function.
In addition, based on the "answer" selected from the combo box, I need to
generate the other details based on this "answer".
Is it possible to incorporate my Combo Box selection "answer" as my
lookup_value in my Vlookup function. If yes, how do i proceed?
Thank you!
--
Dave Peterson
|