Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax help using Combobox1.value

Status
Not open for further replies.

MuskyMan

Technical User
Joined
Jul 31, 2002
Messages
36
Location
US
How do I use the value returned from the use of a combobox in a worksheet?

Here is what I have/need:

User picks the part number using combobox. After selecting the item, I use the VLOOKUP function that uses the value from the combobox as the item to search.

I've tried =VLOOKUP("Combobox1.value",XX:XX,Y) but that does not work.

Thanks for the help..
 
Are you using a Combobox via VBA or via Forms or Cobtrol Toolbox ?
Are you using XL97?
 
I have the combobox as a stand alone control on the worksheet. I did not want to create a UserForm.

What I'm doing now is having the combobox's value returned to a cell in the worksheet after update, then use VLOOKUP from there, but I hoping that there is a way to:

=VLOOKUP([Combobox1.value],A1:A57,2)but this syntax gives me errors..

Using Excel 2002.

Thanks for the help
 
I would suggest using the cbox from the " controls" toolbar.
You will have to give in the input range ( basically the source range for your cbox) and a linked cell.
Each time the user selects a value, the linked cell value changes to the row number of the value selected.
Suppose the user selected the third value, the linked cell will contain number 3.
Now using where you need it the index function : =index ( input range;linked cell value, 1) will return the value selected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top