combo box


Posted by Ren on January 18, 2002 1:37 PM

I am attempting to send the contents of 2 combo boxes to two cells. Unfortunately, they are sending the list number rather than the actual value.

How can I do this?

Thanks

Posted by Aladin Akyurek on January 18, 2002 1:40 PM

=INDEX(List,cell-link)

where List is the Input range and cell-link is the cell to which the ComboBox is linked.

Aladin

Posted by Ren on January 18, 2002 1:44 PM

Where do I put this?
what values do I enter for list? cell-link?



Posted by Aladin Akyurek on January 18, 2002 2:03 PM

Ren --

When you set up a ComboBox (via Forms toolbar), you have to fill in an Input range which can be a range like $E$2:$E$10 or a name e.g., ChoiceList that refers to a range plus a Cell link value (say, $A$2), that is, a cell to which you anchor the ComboBox. Now, when you select something from such a ComboBox, the Cell link will report the position of the selected item in the Input range.

If you want to have the selected item in some cell,

=INDEX(ChoiceList,$A$2) or

=INDEX($E$2:$E$10,$A$2)

will return the selected item or use the selected item in a formula like

=VLOOKUP(INDEX(ChoiceList,$A$2),...)

I thought you wanted to return the selected item into some cell provided you constructed the ComboBox as described above, whence my response.

Aladin
===========