I'm looking to use an active cell as reference to return values from another sheet using a vlookup. I have set my table array and that seems to work fine.
I run the macro and nothing happens- no errors and the message box at the end will not show. I know the active cell matches a value in the table I am referencing so there should not be an N/A error.
Then end goal is to have a Msgbox with last name and first name after clicking a button with this macro assigned.
Sub ContactInfo()
Dim name As String
Dim ArrayRange As Variant
Dim ActCell As Variant
Set ActCell = ActiveCell.Value
Sheets("results").Select
ArrayRange = Sheets("Results").Range(Range("L1"), Range("L1").SpecialCells(xlLastCell))
Lastname = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 3, False)
Firstname = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 2, False)
MsgBox Lastname & Firstname
End Sub