I have a userform in Excel that would like to populate items based on another hidden worksheet in the workbook, table structure like:
Team Agent
1 Leo
1 Mike
2 Tim
2 Eric
2 John
The first combox box can link up to the values in column "Team" (i.e. 1,2,..)
and when i select Team 1 in first combobox, The names of agents for respective teams will pop up in 2nd combobox (i.e. Leo, Mike)
Thanks!
private sub combobox1_change()
set ws=thisworkbook.sheets("sh
combobox2.clear
for each cel in ws.range("A:A")
if cel.value=combobox1.value then combobox2.add cel.offset(0,1).value
next cel
end sub