Computing.Net > Forums > Office Software > Adding a Drop Down Menu with Data

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Adding a Drop Down Menu with Data

Reply to Message Icon

Name: valygirl
Date: April 1, 2009 at 15:30:52 Pacific
OS: Windows 2000
Subcategory: Microsoft Office
Comment:

I currently have a drop down menu in excel; however, I dont know how to include extra data with the selected item from the drop down menu. For example if I have a drop down menu that has three options, jeans, sweater, and t-shirt. I have a number that goes with each item (100, 50, or 25 respectively). When I select jeans from the drop down menu, i need the value 100 to appear in the cell next to the drop down menu. Can someone please help me figure out how to do this?



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: April 1, 2009 at 18:52:36 Pacific
Reply:

Is the data (e.g. 100) static or variable?

If it's static, you can use an IF statement:

Let's say your dropdown is in E1. In E2, enter:

=IF(E1="jeans",100,IF(E1="sweater",50,IF(E1= etc.)))

However, I'm guessing your list is more extensive than 3 items and that the data may change, so I doubt you want to hardcode the formula.

I'd set up a table like:

     
     A         B
1  jeans      100
2  sweater     50
3  t-shirt     25

and then use VLOOKUP:

=VLOOKUP(E1,A1:B3,2,0)

Obviously you'll want to populate the dropdown directly from the range where the items are to ensure an exact match for the VLOOKUP function.


0

Response Number 2
Name: valygirl
Date: April 2, 2009 at 10:58:05 Pacific
Reply:

The VLOOKUP worked great! thank you! (yes, I have about 40 items, which is why I didnt want to hard copy them in, sorry i didnt mention that originally).

The only other question I have is how can I use the VLOOKUP function is my list is on a separate worksheet than the drop-down list? (They are in the same file)

Also, is it possible to do something like this from a separate file?


0

Response Number 3
Name: DerbyDad03
Date: April 2, 2009 at 12:29:38 Pacific
Reply:

For a separate sheet use:

=VLOOKUP(E1,Sheet2!A1:B3,2,0)


For a separate file use something like:

=VLOOKUP(E1,'C:\Documents and Settings\user\Desktop\[Book2.xls]Sheet2'!$A$1:$B$3,2,0)

If the other book (e.g. Book2) is open when you create the formula, the formula should update and add the full path once you save the file.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


loop through ranges Word 2000 (not responding...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Adding a Drop Down Menu with Data

Creating a drop down menu www.computing.net/answers/office/creating-a-drop-down-menu/3028.html

Drop Down Menu and Cell Control www.computing.net/answers/office/drop-down-menu-and-cell-control/7565.html

Excel Drop Down Menu www.computing.net/answers/office/excel-drop-down-menu-/8285.html