Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kh kh is offline
external usenet poster
 
Posts: 8
Default How to combine Combo Box function with Vlookup function

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!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
Default How to combine Combo Box function with Vlookup function

With the combo box from the Forms toolbox you can 'link' it to a cell so that
when you pick a value in the combo box, that value is placed into the linked
cell. You could then reference that cell in your VLookup formula.

Right-click on the combo box and choose [Format Control] and then use the
[Control] tab to set the address of the linked cell. You can probably
double-click on the combo box and have it pull up the [Format Control] dialog
also, if you have the Forms toolbox displayed when you double-click on it.

"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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine IF statement and Vlookup function? mcmilja Excel Discussion (Misc queries) 2 June 6th 08 06:07 PM
combine vlookup and copy function pamber Excel Worksheet Functions 2 September 17th 07 11:12 PM
combine Vlookup with the Right function Harold Good Excel Worksheet Functions 3 May 4th 07 04:10 PM
How do I combine If and VLookup function? Felicia Pickett Excel Worksheet Functions 2 December 14th 05 12:06 AM
How to combine a vlookup with a sumif function!!! Mark the Shark Excel Discussion (Misc queries) 2 April 6th 05 11:54 AM


All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"