Put combobox value to another cell

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
832
Office Version
  1. 365
Platform
  1. Windows
I am trying to show the value of a combo box in another cell but I'm not getting the results I expect.

I have a combobox , using the range N1:N36, linked to cell A3. The combobox is situated over cell A3 and hiding it from view.

What I'd like to do is have the value selected in the combobox also shown in cell A1. However, when I select a name in the combobox, the value in A3 (and also in cell A1) is a number which corresponds to the place in the list. For example the third name in the list (N1:N36) is Jones. If this is selected bot A3 and A1 display 3 and not the name.

What am I doing wrong?

Mel
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
832
Office Version
  1. 365
Platform
  1. Windows
OK, folks, I've solved the problem.

Mel
 

smozgur

BatCoder
Joined
Feb 28, 2002
Messages
1,403
Glad to hear you got the solution.

Do you mind posting about your solution? Then it is perfectly fine to mark your post as the solution to help future readers.
 

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
832
Office Version
  1. 365
Platform
  1. Windows
I used an Activex ComboBox and in the code linked it to cell A4. I then positioned the ComboBox over cell A4. The cell that I wanted to display the same value, A1, was =A4. I needed this for auto tab naming purposes.

Mel
 
Solution

smozgur

BatCoder
Joined
Feb 28, 2002
Messages
1,403
Thanks for explaining your solution. You can now mark your post as the solution since it solves the problem.

However, I will suggest another method (the preferred method).

The Combobox linked cell will show the row index of the selected item, not the selected text value. In this case, you can simply use the INDEX function in the cell that you want to show the text value:

Following the initial structure you explained: the linked cell of the Combobox is A3, the data range is N1:N36, and the following formula goes to cell A1. We are simply selecting the nth item in the range by providing the second argument as the selected item index in the Combobox.
Excel Formula:
=INDEX(N1:N36,A3)
 

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
832
Office Version
  1. 365
Platform
  1. Windows
Thanks for the tip, Smozgur - most appreciated.
Mel
 

Watch MrExcel Video

Forum statistics

Threads
1,129,499
Messages
5,636,688
Members
416,935
Latest member
Atulcp

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