Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Use "VLookup" function

i want to know that how to use "VLookup" function in VBA?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Use "VLookup" function

There is plenty of informationin the Excel help

-----Original Message-----
i want to know that how to use "VLookup" function in VBA?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Use "VLookup" function

dim target as Range
Dim lookRange as Range
Dim res as Variant

Set target = Range("A1")
Set lookRange = worksheets("Sheet2").Range("A1:F300")

res = Application.Vlookup(Target,lookRange,2,False)
if iserror(res) then
' not found
else
msgbox "Result is " & res
End if


--
Regards,
Tom Ogilvy


"Grey" wrote in message
...
i want to know that how to use "VLookup" function in VBA?


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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
vlookup function returning "na" even though the vlaues are present VKL Narayanan[_2_] Excel Worksheet Functions 2 March 20th 10 09:25 AM
Excel crashes when typing "false" in VLookup function pcbins Excel Worksheet Functions 18 January 30th 09 09:24 PM
correct syntax for nesting "if", "and", and "vlookup"....if possib Christine Excel Worksheet Functions 4 January 2nd 09 10:43 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM


All times are GMT +1. The time now is 01:36 AM.

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"