Thread: vlookup in VBA
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default vlookup in VBA

Hi
try:
Range("b50").Value = WorksheetFunction.VLookup(range("a50"),
range("c39:d40"), 2, 0)

--
Regards
Frank Kabel
Frankfurt, Germany

"teresa" schrieb im Newsbeitrag
...
Hi All,
I'm trying the code below for a Vlookup and get
"Application-defined or Object-defined error",
I'd love to know why:

Sub fact()

Range("b50").Select
Range("b50").Value = WorksheetFunction.VLookup("a50", "c39:d40", 2,

[false])

End Sub