LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default UDF not working for VLookup

I am trying to write a UDF but it does not work.
Here is my simple code, what am I doing wrong?

===================
Public Function PP(rng)
Dim WB As Workbook

Set WB = Workbooks("Code Master.xls")
MsgBox WB.Sheets(1).Range("A10").Value
Set VLRNG = WB.Sheets("SHEET1").Range("B:K")
'PP = Application.WorksheetFunction.VLookup(rng.Value, VLRNG, 4, 0)
'<<<not working
PP = Evaluate(Application.WorksheetFunction.VLookup(rng , VLRNG, 4,
0))'<<<not working

End Function
==================

Pl help.

Regards,
 
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 Not working caverchik Excel Worksheet Functions 3 May 3rd 12 02:22 AM
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 07:33 PM
VLOOKUP NOT WORKING missymissy Excel Discussion (Misc queries) 4 September 15th 06 10:01 AM
Vlookup no working Rose Davis New Users to Excel 6 August 27th 05 06:18 PM
Vlookup still not working SHIPP Excel Programming 2 March 3rd 05 02:58 PM


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