Hello
I have an activity where I need to filter a column populate unique values from another column.
For an example: as per my selection with column A as "Vegetables"; with comboBox2, unique values or unique vegetable names from column B to load.
Presently I use:
But with the above code, the problem is; it is not loading unique values.
I have attached a sample file. Please help.
Many thanks in advance.
I have an activity where I need to filter a column populate unique values from another column.
For an example: as per my selection with column A as "Vegetables"; with comboBox2, unique values or unique vegetable names from column B to load.
Presently I use:
Code:
ComboBox1.List = Filter([transpose(if(countif(offset(A2,,,row(1:300)),A2:A300)=1,A2:A300))], "False", False)
Code:
Dim v, e
With ActiveSheet.Range("J21:J1500")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.ComboBox1.List = Application.Transpose(.keys)
End With
ComboBox2.Value = "Process Flow"
With ActiveSheet.Range("H21:H1500")
v = .Value
End With
With CreateObject("scripting.dictionary")
.comparemode = 1
For Each e In v
If Not .exists(e) Then .Add e, Nothing
Next
If .Count Then Me.ComboBox2.List = Application.Transpose(.keys)
End With
But with the above code, the problem is; it is not loading unique values.
I have attached a sample file. Please help.
Many thanks in advance.