Dim Res as Variant
res = application.vlookup(me.textbox1.value, _
thisworkbook.worksheets("sheet999").range("a1:B10" ),2,false)
if iserror(res) then
me.textbox2.value = "No match, the board goes back"
else
me.textbox2.value = res
end if
====
You may want to change the workbook and the sheetname, though.
wrote:
Hi
I am trying to get a textbox (textbox2) in a userform to vlookup data
(entered into textbox1) from cells ("a1:b10"). Can anybody please
advise if this can be done and how?
thanks
--
Dave Peterson