Thread: Vlookup in VBA?
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Vlookup in VBA?

Is that list a single column or single row?

dim res as variant
dim myList as variant
mylist = array("abc","def","ghi")
res = application.match(me.textbox1.value,mylist,0)

if iserror(res) then
msgbox "not found"
else
msgbox "found at pos: " & res
end if



skuzapo wrote:

Hi,

Is there an equivalent function in VBA to find something in a list
based on input in a form?

Thanks for your help....

--
skuzapo
------------------------------------------------------------------------
skuzapo's Profile: http://www.excelforum.com/member.php...o&userid=27430
View this thread: http://www.excelforum.com/showthread...hreadid=470110


--

Dave Peterson