Multi-Select Dependent List Boxes Possible

jaysunice

New Member
Joined
Jan 13, 2011
Messages
12
Here's the situation. I more or less have a tiny "database" (if you'd even call it that) that contains:
  1. Brands
  2. Products
  3. Descriptive Categories
Each Brand (15) can contain anywhere from 2 to 30 different Products. Each Product, contains the same set of 15 Descriptive Categories.

***

I would like to create a way to have a mult-select list box drop down that would allow me to choose one or more of the Brands. Then, a second dependent list would allow me to choose (one or more) amongst the relevant Products for the associated Brands that were just selected. Finally, a query button that returns the pertinent information in a table format.

***

I know how to create dependent lists using =Indirect() via Data Validation lists, however, this does not translate to Mult-Select List Boxes.

Many Thanks!
 
This may be the basis of what you want, to load "StudyArmBox" from selection in "IDBox"
Place a Commandbutton on Userform and insert code below.
NB:- Change Properies of "IdBox" to "Multselect"

Code:
Private [COLOR="Navy"]Sub[/COLOR] CommandButton1_Click()
[COLOR="Navy"]Dim[/COLOR] R [COLOR="Navy"]As[/COLOR] Variant, nn [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
R = Sheets("MasterSheet").Cells(1).CurrentRegion.Resize(, 3)

[COLOR="Navy"]With[/COLOR] IDBox
    StudyArmBox.clear
    [COLOR="Navy"]For[/COLOR] n = 0 To .ListCount - 1
        [COLOR="Navy"]If[/COLOR] .Selected(n) [COLOR="Navy"]Then[/COLOR]
            [COLOR="Navy"]For[/COLOR] nn = 1 To UBound(R)
                [COLOR="Navy"]If[/COLOR] R(nn, 1) = .List(n) [COLOR="Navy"]Then[/COLOR]
                    StudyArmBox.AddItem R(nn, 3)
                [COLOR="Navy"]End[/COLOR] If
            [COLOR="Navy"]Next[/COLOR] nn
        [COLOR="Navy"]End[/COLOR] If
    [COLOR="Navy"]Next[/COLOR] n
[COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Last edited:
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,224,567
Messages
6,179,571
Members
452,927
Latest member
whitfieldcraig

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