Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Vlookup in VB code

Hi, what's the best way to make something like VLOOKUP in VB code?
Thanx
alekmil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Vlookup in VB code

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

"alekm" wrote in message
...
Hi, what's the best way to make something like VLOOKUP in VB code?
Thanx
alekmil



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup VBA code cluckers Excel Discussion (Misc queries) 16 August 19th 09 08:40 PM
VLOOKUP as a vb code Tdp Excel Discussion (Misc queries) 5 November 25th 08 10:01 PM
Using VLOOKUP in VBA code Mark Excel Worksheet Functions 2 August 18th 06 04:41 PM
VLOOKUP for Zip Code Ranges JerseyJR Excel Worksheet Functions 2 September 6th 05 06:37 PM
Help with Vlookup code Gareth[_3_] Excel Programming 0 November 19th 03 07:28 PM


All times are GMT +1. The time now is 04:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"