Vlookup result in a message box
Hi again,
Am Tue, 9 Sep 2014 08:14:34 -0700 (PDT) schrieb L. Howard:
'IFERROR(VLOOKUP(H17,L2:Q75,J2,0),"Game?")
use the find method instead:
Sub TestNew()
Dim wsh As Worksheet
Dim rngLook As Range, c As Range
Dim currName As String
Set wsh = Sheets("Sheet1")
Set rngLook = wsh.Range("E1:E5")
currName = wsh.Range("B1")
Set c = rngLook.Find(currName, LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
MsgBox c.Offset(, 1)
Else
MsgBox "Game?"
End If
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|