Vlookup in VB code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, what's the best way to make something like VLOOKUP in VB code?
Thanx
alekmil
 
You can either call the Vlookup function:

dim vAnsa as variant
vAnsa=application.Vlookup(lookupval,oLookupRange,k,True)

(use a variant because it can return an error value like #N/A)

or write your own (binary search for sorted, sequential array search for
unsorted)


Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top