Question Locked

combo box in excel

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I am doing adding combo boxes for data entry purposes to save time.
There will be a few columns:
1. type of car (column A)
2. power (column B)
3. mileage (column c)
4. cost (column D)
5. safety features (column E)

I would like to know if it is possible to integrate all the information in to one combo box in such a way that, if i select one type of car it should display the corresponding power, mileage, cost and safety features of that car.
IS there any solution for this, please do this needful.

Thanks.

2 replies

by thumbsup2

Although, it takes a lot of front loading, it's very easy to do.

Just use the vLookUp formula in the cells that you want to be filled in based on the selection of the drop down.

First, on another worksheet in the workbook, load all of the data by keying in all of the specifics for EACH "type" of car in individual columns across the sheet. Put Type in one column, power in the next, mileage in the next, etc... across the sheet making one row for EACH "type" that you want to be able to select. Make sure you do NOT have any duplicate names in the "type" column because you will be using that to do the lookup function. Once it's all keyed in, sort all of that data on that sheet by the "type" column. If you later have to add rows to the data, be sure to sort again.

Now, on your main sheet, create a combo box where you want it and use the "type" column of data to pre-fill the list. Now, in the cells where you want the Power, Mileage, Cost, Features to appear, use the vLookUp formula, telling it to "look up" based on the contents of the cell that is behind your combo box. Just type the cell reference in manually.... ie... if you combo box sits over the top of cell A1, then use $A$1 for the basis of your lookup function. Even though you may not be able to see it, the combo box will fill the cell behind it with whatever is selected. Select the entire table on the other worksheet as range of cells for the table location, tell it what column of that data you want to appear in this particular cell and use the word FALSE for the last box (ie, you want an exact match, not just something close).

Your vLookUp function might look something like this:

=VLOOKUP($A$1,Sheet2!A1:C6,2,FALSE)

Repeat this same function for each of the other fields you want to pre-fill from the table, changing the offset column to indicate a different cell to retrieve data from.

This discussion is closed to new replies.