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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Status
Not open for further replies.

Forum statistics

Threads
1,215,102
Messages
6,123,097
Members
449,096
Latest member
provoking

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