Drop down menu

S

stolencar75

Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Intel

I have a product list that I have made into a drop down menu. I want to be able to choose a product from this list and have the cell next to it give the product number of the item I chose. How do I do this?

If someone could point me in the right direction as to where to look, I would be grateful.
 
B

Bob Greenblatt

Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Intel

I have a product list that I have made into a drop down menu. I want to be
able to choose a product from this list and have the cell next to it give the
product number of the item I chose. How do I do this?

If someone could point me in the right direction as to where to look, I would
be grateful.
I assume that somewhere, you have a table listing the products and product
number in an adjacent column, and that you have used the first column as the
source for the list. If this is the case, format the list control to link to
a cell. When you select a product, this cell will contain an index number
representing the nth product selected. In the cell adjacent to the cell with
the dropdown, use an INDEX formula which references the linked cell from the
list and the column of product numbers. Look in help for format and
structure of the INDEX function.
 
S

stolencar75

Thanks a bunch. I do have a these lists. I just don't now how to use index formulas. But this is a good time to learn! I appreciate the point in the right direction. Again, thank you for your time.
 
S

Shane Devenshire

Hi,

Let's use VLOOKUP first:

=VLOOKUP(A1,C1:F100,2,False)

This says look up the value from A1 (your drop down) and find it in the
first column of the range C1:F100 and return the entry on the same row but
from the second column (column D in the above example). False means it is an
exact match.

INDEX is used with MATCH:

=INDEX(D1:D100,MATCH(A1,C1:C100,0))

This is set up to duplicate the VLOOKUP result in this case.
 
S

stolencar75

Thanks Mr. Devenshire,
Mr. Greenblatt had mentioned using an INDEX formula so I studied up on that and eventually came to use MATCH within the INDEX formula as you stated. Although it was very difficult to understand at first, after a bit of studying I was able to figure it out. I did, however, come across VLOOKUP while I was trying to find a way to do what I wanted, but as I said, it was very difficult to understand at first and I didn't know if that was what I was looking for. I will look into this more to get a better understanding.

Thank you all so much for you time. I appreciate your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top