excel - VBA list reference to -


i store multi-dimenension list memory in excel vba preform function. using vendor id, can alpha numeric, return 3 other values associate vendor. use mailing address example. have list of vendors business along mailing address. when creating invoice these vendors, want able lookup/ refer mailing address line 1 , line 2 , zip code etc based upon name.

the data stored

"abc corportation", 123 main st, new york, new york, 12345   "my company", 456 not here, buffalo , newy york, 12367   etc.   

when creating bill, have "abc corportation" , want return 123 main st, new york new york.

i prefer not having create loop scan through list each time want lookup vendor address.

props david zemens answer / question, vlookup way go long data format index in left column.

 avalue = "abc company"   answer = ""   dim myrange range  on error resume next  set myrange = worksheets("vendor lookup").range("a1:d99")  answer = application.worksheetfunction.vlookup(avalue, myrange, 2, false)  if answer <> "" msgbox (answer) 

thanks quick repsonses.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -