Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Undefined unction when using VLOOKUP

When I try to use VLOOKUP or MATCH in VBA, it tells me
function not defined. I checked the References but did not
know which reference to use. Help! Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Undefined unction when using VLOOKUP

"cici" wrote in message
...
When I try to use VLOOKUP or MATCH in VBA, it tells me
function not defined. I checked the References but did not
know which reference to use. Help! Thanks


Are you prefixing the names of the functions with Application or
Application.WorksheetFunction?

Application.WorksheetFunction.VLookup

should give you access to all the Excel worksheet functions you can use from
VBA. The syntax above will throw a run-time error if the value is not
located. The following syntax:

Application.Vlookup

will return a Variant error value if the value isn't located.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Undefined unction when using VLOOKUP

cici wrote:
When I try to use VLOOKUP or MATCH in VBA, it tells me
function not defined. I checked the References but did not
know which reference to use. Help! Thanks


Hi
try
ret_value=Application.WorksheetFunction.VLookup(.. .your parameters...)

Frank
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
If Unction with text Deldridge Excel Worksheet Functions 3 April 28th 09 07:11 PM
VBA Functions Undefined James O. Thompson Excel Worksheet Functions 2 January 20th 09 10:41 PM
Error: Undefined or non-rectangular name Conan Kelly Excel Worksheet Functions 0 August 7th 08 03:29 AM
Undefined function error CLamar Excel Discussion (Misc queries) 3 June 5th 06 07:07 PM
Variable Undefined When Blank Mike[_41_] Excel Programming 0 August 5th 03 01:53 PM


All times are GMT +1. The time now is 06:41 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"