Hi Guys,
Basically I have a combo box on a userform which Is populated using the following code.
The below is done on userform initialize
Once ComboBox Changes on user selection the following code does a VLOOKUP Based on the Value in the combo box and finds the data in the desired column and then places it in the textbox.
Supposing my data is filtered on the sheet how would I tell it to only vlookup the visible cells?
Also I Would like to add another textbox and button that would allow me to click to vlookup like the above but then replace the contents of the lookup with whats in the textbox. I would also like to add that the value in the combo box is always unique
cheers
Basically I have a combo box on a userform which Is populated using the following code.
The below is done on userform initialize
Code:
Me.ComboBox1.List = ActiveSheet.ListObjects("Table1").ListColumns(1).DataBodyRange.Value
Once ComboBox Changes on user selection the following code does a VLOOKUP Based on the Value in the combo box and finds the data in the desired column and then places it in the textbox.
Code:
Me.TextBox1.Text = Application.WorksheetFunction.VLOOKUP(me.ComboBox1.Value, Worksheets("Sheet1").Range ("A2:W591") , 6 , False)
Supposing my data is filtered on the sheet how would I tell it to only vlookup the visible cells?
Also I Would like to add another textbox and button that would allow me to click to vlookup like the above but then replace the contents of the lookup with whats in the textbox. I would also like to add that the value in the combo box is always unique
cheers