Combo Box - Forms

lefty78312

Active Member
Joined
Oct 25, 2007
Messages
275
I have what should be an easy one, but I can't make it work. I'm displaying a list of items on sheet1, $a$2 (the actual info is on sheet2), and vlookup to lookup info about the selected item. It works perfectly until I add a combo box so users will know to click on the down arrow. The cell where the user makes their selection is linked to sheet1, $a$2, and the list from the input range shows perfectly, but columns 2 - 4 won't read the info in cell A2 when I use the combo box, and I get #N/A for an answer in those columns. I must be missing an important step.

The formulae in sheet1, columns B2:D2 are <code>=VLOOKUP($A$2,Sheet2!$A$2:$D$16,2,0), =VLOOKUP($A$2,Sheet2!$A$2:$D$16,3,0)</code>, etc.

Any idea where I'm going wrong?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,348
If your combobox is from the Forms menu (not an ActiveX combobox) then the value in A2 is the index of the selection, not the text of the selection.

The formula in B2 could be
=INDEX(Sheet2!$A$2:$D$16, $A$2, 2)

Or you could use VLOOKUP formulas with an ActiveX combobox, which puts the list's value in the linked cell.
 
Upvote 0

lefty78312

Active Member
Joined
Oct 25, 2007
Messages
275
If your combobox is from the Forms menu (not an ActiveX combobox) then the value in A2 is the index of the selection, not the text of the selection.

The formula in B2 could be
=INDEX(Sheet2!$A$2:$D$16, $A$2, 2)

Or you could use VLOOKUP formulas with an ActiveX combobox, which puts the list's value in the linked cell.

I don't know how to use vlookup with an ActiveX combobox, but the index formula works perfectly. Thank you.
 
Upvote 0

Forum statistics

Threads
1,190,691
Messages
5,982,314
Members
439,772
Latest member
KimPhoenixT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top