Have you tried:
Dim result As String
Dim sheet As Worksheet
Set sheet = ActiveWorkbook.Sheets("Data")
result = Application.WorksheetFunction.VLookup(sheet.Range("AN2"), sheet.Range("AA9:AF20"), 5, False)
More Related Contents:
- Save excel file multiple times with file names in another workbook.
- Sequence of numbers based on start and end value of 2 cells [closed]
- Function to convert column number to letter?
- Read/Parse text file line by line in VBA
- Better way to find last used row
- Excel VBA: Answer gets “stuck”
- 2 Dimensional array from range [closed]
- filter out multiple criteria using excel vba
- Excel VBA autofilter all but three
- Cells.Find() Raises “Runtime Error 91: Object Variable or With Block Not Set”
- Using Google Chrome in Selenium VBA (Installation Steps)
- Dir() function not working in Mac Excel 2011 VBA
- Excel VBA code to copy a specific string to clipboard
- How to use workbook.saveas with automatic Overwrite
- Range limit conundrum
- How do you run a .exe with parameters using vba’s shell()?
- Excel VBA – Range.Copy transpose paste
- How to use FindWindow to find a visible or invisible window with a partial name in VBA
- How do you get a Range to return its Name?
- Passing variable from Form to Module in VBA
- Excel VBA: Convert a date string to a Unix timestamp
- excel to pdf ignores print area and calls printer
- In Excel, can I use a hyperlink to run vba macro?
- Excel VBA – exit for loop
- Macro to export MS Word tables to Excel sheets
- VBA WinHTTP to download file from password proteced https website
- Create folder path if does not exist (saving from VBA)
- Access files with long paths (over 260)
- Concatenate multiple ranges using vba
- How to fix a VBA “type mismatch” error after switching to 64-bit Excel