View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default What is the VBA equivalent of the excel function VLOOKUP

Homework?

Sub VlookupVBA()
mv = "item2"
Set found = Columns(1).Find(mv, After:=Cells(1, 1), _
LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
If Not found Is Nothing Then
MsgBox found.Offset(, 1)
Else
MsgBox "Not found"
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"hverne" wrote in message
...
How do I do the equivalent of the Excel VLOOKUP function in an Excel
(2007)
Macro?