G Guest Sep 7, 2004 #1 Hi, what's the best way to make something like VLOOKUP in VB code? Thanx alekmil
C Charles Williams Sep 7, 2004 #2 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
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