2nd combobox fill with list based on selection from 1st combobox

dizzydunham

New Member
Joined
Mar 22, 2014
Messages
30
I'd like to alter what populates the second combobox depending on the selection of the first combobox.

The first combobox is populated from a table range with company names. This is on a userform.(dictionary stops multiple repeats)
the second combobox is created at run time and populates from a table range with surnames.

The table has a column where company names are inputted and have multiple amounts of the same name of the companys
the next column has the surnames of the company and can have multiples of the same name.

when the user selects say - apple - in combobox1 iwould like to return all surnames in combobox 2 that are associated with apple only





any links or point of direction would be most gratefully received.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi! See this:

Do you can use the validation with options, example A, B, C.
in other cell, insert other data validation, permission type "List" and the formula:

IF(E1="a";A1:A3,IF(E1="b",B1:B3,IF(E1="c",C1:C3)))

Therefore, when you change the first validation, the second one will change as well. And you can use named ranges.

For userforms, read this article: http://www.excel-easy.com/vba/examples/dependent-combo-boxes.html
 
Upvote 0
thanks for this,

its a good work through.

Ive also had another idea of tackling it and just finished reading up a little about using the advanced filter method as well, will try out 1 of these ideas hopefully tomorrow and see how it fairs.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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