Dependent Drop Down

Kaoutar

New Member
Joined
Feb 5, 2018
Messages
1
Hi all,

I am working on a form that includes product selection through drop-down menus. It starts off with a product category, a chosen category predefines a choice of product names. After choosing a product name, the user needs to select two parameters which both depend on the product name. My challenge is in having these two lists depend on the unique product name.

Can anyone help me think this through?

Thanks in advance for the help.

Kaoutar
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
on the afterupdate event of cboCATA, clear and reload items that only have that cata

Code:
sub cboCata_afterUpdate()
  LoadProducts
end sub

Sub LoadProducts()
Dim vProd, vCata

cboProd.Clear
Sheets("Products").Select
Range("A2").Select
  'product is in A
  'cata is in B
While ActiveCell.Value <> ""
     vProd = activeCell.Offset(0, 0).Value
     vCata = activeCell.Offset(0, 1).Value
     
     If vCata = cboCata Then cboProd.AddItem vProd         'load product that has the Cata
          
     ActiveCell.Offset(1, 0).Select  'next row
Wend
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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