Userform Combobox, only include rows where column x = value

Status
Not open for further replies.

Kyletok

New Member
Joined
Sep 16, 2017
Messages
47
I have a combobox list that I populate with
Code:
Private Sub UserForm_Initialize()
Me.ComboBox1.List = [Accounts].Columns("A:B").Value
End Sub

the combobox has 2 columns, with the first one being bound:
which works wonders as It shows me the account number and the vendor it belongs to.

some account numbers can exist more than once as long as they belong to different vendors. The vendors repeat many times as accounts and vendors have a one to many relationship.

So it's important to point out that I am not looking to find unique values in either column, as I need the duplicates to remain just like when you would filter through a table filter.

so here's what I am trying to achieve:
I want to filter through the rows that are included in the combobox, depending on the value on column D (or 4)

Column D is the assigned analyst to the account - I want analysts to only have the accounts that belong to them populate to the combobox.

is there a way to filter [Accounts].Columns("A:B").Value, to only include rows where Column 4 = "Ariel" (for example).

thanks in advance for any input
 

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.
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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