Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLookup in VB?
Is there a way to access functions in a sub ? i'd like to use vlookup in one of my VB modules... thanks in advanc -- UofMo ----------------------------------------------------------------------- UofMoo's Profile: http://www.excelforum.com/member.php...fo&userid=2648 View this thread: http://www.excelforum.com/showthread.php?threadid=39760 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLookup in VB?
Sure is
ans = Application.VLOOKUP(val,rng,2,False) -- HTH RP (remove nothere from the email address if mailing direct) "UofMoo" wrote in message ... Is there a way to access functions in a sub ? i'd like to use vlookup in one of my VB modules... thanks in advance -- UofMoo ------------------------------------------------------------------------ UofMoo's Profile: http://www.excelforum.com/member.php...o&userid=26485 View this thread: http://www.excelforum.com/showthread...hreadid=397602 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLookup in VB?
Take a look at the WorksheetFunction method of the Application object. It let's you access most worksheet functions in VBA. By the way using Vlookup in VBA can sometimes be a problem, if error are returned by the function VBA won't like it -- Nori ----------------------------------------------------------------------- Norie's Profile: http://www.excelforum.com/member.php...fo&userid=1936 View this thread: http://www.excelforum.com/showthread.php?threadid=39760 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLookup in VB?
or worksheetfunction.vlookup(val,rng,2,False)
Bob Phillips wrote: Sure is ans = Application.VLOOKUP(val,rng,2,False) -- HTH RP (remove nothere from the email address if mailing direct) "UofMoo" wrote in message ... Is there a way to access functions in a sub ? i'd like to use vlookup in one of my VB modules... thanks in advance -- UofMoo ------------------------------------------------------------------------ UofMoo's Profile: http://www.excelforum.com/member.php...o&userid=26485 View this thread: http://www.excelforum.com/showthread...hreadid=397602 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLookup in VB?
Easily handled,
ans = application.vlookup(.... If Iserror(ans) Then ... or On Error ans = WorksheetFunction.VLookup(... On Error Resume Next If IsEmpty(ans) Then ... -- HTH RP (remove nothere from the email address if mailing direct) "Norie" wrote in message ... Take a look at the WorksheetFunction method of the Application object. It let's you access most worksheet functions in VBA. By the way using Vlookup in VBA can sometimes be a problem, if errors are returned by the function VBA won't like it. -- Norie ------------------------------------------------------------------------ Norie's Profile: http://www.excelforum.com/member.php...o&userid=19362 View this thread: http://www.excelforum.com/showthread...hreadid=397602 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLookup in VB?
Thanks everyone, I think i got it to work with your help! You're the best -- UofMoo ------------------------------------------------------------------------ UofMoo's Profile: http://www.excelforum.com/member.php...o&userid=26485 View this thread: http://www.excelforum.com/showthread...hreadid=397602 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If (Vlookup 0) working, but what if Vlookup cell does not exist | Excel Worksheet Functions | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) | New Users to Excel | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |