Combo box interagation

Phil J

New Member
Joined
Apr 21, 2002
Messages
8
I have created a combo box in sheet using the control toolbox function and defined the list of surnames. I want to be able to create an "if" statement that looks at the entry selected in the combo box and gives the corresponding address. I have allocated a name to the combo box and used that name in an "if" statement but only get a false result. Any assitance appreciated.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
On 2002-05-12 18:07, Phil J wrote:
I have created a combo box in sheet using the control toolbox function and defined the list of surnames. I want to be able to create an "if" statement that looks at the entry selected in the combo box and gives the corresponding address. I have allocated a name to the combo box and used that name in an "if" statement but only get a false result. Any assitance appreciated.

=VLOOKUP(E8,Addresses,2,0)

where E8 is the LinkedCell and List is the value for ListFillRange.

In your case List would be the list of surnames.

Hope this helps.
This message was edited by Aladin Akyurek on 2002-05-12 19:19
This message was edited by Aladin Akyurek on 2002-05-12 19:24
 
Upvote 0
Hi Aladin:
Wouldn't the linked cell give the index number (i.e the row number of the selected list item -- in that case

=index(Namerange,LinkedCell,2) will give surname if the surname is in column 2 of the NameRange

Regards!
This message was edited by Yogi Anand on 2002-05-12 20:24
 
Upvote 0
On 2002-05-12 20:22, Yogi Anand wrote:
Hi Aladin:
Wouldn't the linked cell give the index number (i.e the row number of the selected list item -- in that case

=index(Namerange,LinkedCell,2) will give surname if the surname is in column 2 of the NameRange

Regards!
This message was edited by Yogi Anand on 2002-05-12 20:24

I believe the combobox is created with View|Toolbars|Control ToolBox, not Forms.

In the latter case:

=VLOOKUP(INDEX(Input-range,Cell-link),Addresses,2,0)

would be more appropriate.
 
Upvote 0
I reviewed the file emailed to me by PhilJ ...

if the ComboBox is made with View|Toolbars|ControlToolBox -- then linked cell selects the actual item from the list, and the correct formula to use is:

=VLOOKUP(LinkedCell,List,2,0)

if the ComboBox is made with View|Toolbars|Forms -- then the linked cell selects the index_number of the item, and the correct formula to use is:

=INDEX(List,index_number,2)
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,262
Members
448,953
Latest member
Dutchie_1

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
Back
Top