Hi Guys,
I'm a newbie and was wondering if someone out there can shed some light on my dilemma with my code.

I'm currently have creating a user form and I have a worksheet (master) that has 3 columns...col B:State, col C:Profession, col D:Salary

On the excel side I have a code which works(perfectly) like this: =VLOOKUP(C40&"|"&C44,CHOOSE({1,2},master!B3:B12086&"|"&master!C3:C12086,master!D3:D12086),2,0)

what it does is, that when a state is chosen from the pulldown and a profession is chosen from the profession pulldown, it refers back to my master worksheet range and
returns the particular salary value, correlating to the particular state and profession into the cell.

My questions is, how can I translate this formula to work in VBA coding for my user form to work the same as my excel.

Any help or insight will be greatly appreciated.