Combo Box Values not Numbers

D

Doyle Brunson

How do I get a combo box to return values not numbers. My combo box
displays January - February, but my linked cell only displays 1-12. How
do i get what is actually in the combo box to appear in the linked
cell.

I have searched for hours for a solution to this - any help would be
great!
 
B

Biff

Hi!

Put the linked cell "behind" the combo box. Then use a formula to reference
that linked cell.

Assume you have the months listed in the range J1:J12 as the source (input
range) and you want the selection from the combo box to appear in cell A1.
The combo box covers cell D6 so make cell D6 the linked cell. Then use a
formula like this in A1:

=INDEX(J1:J12,D6)

Biff

"Doyle Brunson" <[email protected]>
wrote in message
news:D[email protected]...
 
P

paul

i ussually put my linked cell at the bottom of my range,I like biffs idea
tho...to show your month you can also use Choose(d6,j1,j2,j3,j4......)The
referencing of the combo box is right at the end of the forms combobox help
Combo box A drop-down list box. The item that is selected in the list box
appears in the text box.

Combo box properties

Input range Reference to the range containing the values to display in
the drop-down list.

Cell link Returns the number of the item that's selected in the combo box
(the first item in the list is 1). You can use this number in a formula or
macro to return the actual item from the input range.

For example, if a combo box is linked to cell C1 and the input range for the
list is D10:D15, the following formula returns the value from range D10:D15
based on the selection in the list:

=INDEX(D10:D15,C1)
 
D

Doyle Brunson

Thanks Biff, I followed those instructions, and after I entered th
formula in A1 it did indeed display the text from the Combo Box
bingo! But then when I changed the combo box selection it wasn'
updated in A1 (the number was being updated in the linked cell thoug
when I took a peek). Any suggestions
 
D

Doyle Brunson

I must be making some fundamental error.

Using Choose (d6,j1,j2,j3,j4......) the combo box text was reflected i
the desired cell, but when a further option was selected the cell di
not update with the text (the linked cell did however update it
number).

When I tried to use the number generated in the linked cell to retur
the actual item from the input range (using IF formula) it did no
work.

What am I doing wrong? I am a noddy
 
D

Doyle Brunson

I think I know what I am doing wrong. I am just inserting a combobox
right clicking it and inserting the range and linked cell into th
prompt boxes.

But in fact do I need to write a macro to make this work
 
D

Debra Dalgleish

You could use a dynamic name for the source range, instead of a cell
reference. This would grow automatically as new items are added. There
are instructions here:

http://www.contextures.com/xlNames01.html

If you use a combo box from the Forms toolbar it will return numbers. If
you use a combo box from the Control toolbox, it will return the
selected item.
 
Top