Hello Guys, I'm fairly new to VBA excel and got stuck with my dependent ComboBox. Appreciate it if someone could lend a hand or guide me to a right direction.
The Setup: 2 ComboBox (1 parent and 1 child). 2 Column table (I assigned a namerange for both columns) — Column1 is consist of recurring types. Say TypeA, TypeB and so on and Column2 is consist of unique values that is related to Column1.
ComboBox1 is populated by the items from Column1 (I added function to not include duplicates). So it's basically just TypeA, TypeB and TypeC.
[TABLE="class: grid, width: 200"]
Column1
[/td]Column2
[/td]TypeA
[/td]Val1
TypeB
[/td]Val2
[/td]TypeC
[/td]Val3
[/td]TypeA
[/td]Val4
[/td]TypeA
[/td]Val5
[/td]TypeB
[/td]Val6
[/td]TypeA
[/td]Val7
[/td]TypeA
[/td]Val8
[/td]
[/TABLE]
So what I want to happen is for the ComboBox2 to return a list depending on the value of ComboBox1.
So for example, if the user picked TypeA, ComboBox2 values or list will be Val1, Val4, Val5, Val7, Val8.
Any idea how should I implement it? I've been trying to search online but I couldn't find the exact function that I needed.
I could just put a namerange for each groups and just return it with a case but overtime, the source gets updated so I need it to be flexible.
Hopefully what I want to happen is possible. Appreciate any help from the experts out there.
Many thanks.