How to populate 2 dependent comboboxes with values from the columns in a sheet?

excel_sat

New Member
Joined
Jun 10, 2015
Messages
22
Hi guys,

I am brand new to excel.

I have a sheet "forecast" where there are columns like Name,Department, Employee Id.. each having 400+ rows and they might increase.
I have a userform where there are 2 dependent comboboxes named combo1,combo2.I have added few column names to combo1 as they are limited as below.
Private Sub UserForm_Initialize()
With combo1
.AddItem "Employee ID"
.AddItem "Name"
.AddItem "Department"
End With
End Sub

When I select "Name" from combo1, the combo2 pulls the data from the respective column. mind that these values should be unique and blank spaces should be ignored.

Any help will be much appreciated...

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi

my question is how can I populate the unique and non blank values from the sheet's column to the combobox2 which is dependent on combobox1.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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