How can I do that?
Get a handle on Excel application, and the specified file, and then do your VLOOKUP from that.
Dim lookupValue as String
Dim xlApp as Object, xlWB as Object, xlWS as Object, xlRange as Object
lookupValue = ActivePresentation.Slides(1).Shapes(1).TextRange.Text '## Modify as needed
Set xlApp = CreateObject("Excel.Application")
Set xlWB = xlApp.Workbooks.Open("C:\your\file.xlsx") '## Modify as needed
Set xlWS = xlApp.Worksheets("your sheet name") '## Modify as needed
Set xlRange = xlWS.Range("A1:F1000") '## Modify as needed, the Vlookup range
Then you can use the VLOOKUP
or MATCH
functions in VBA, against the xlWS.Range
object where the data should be pulled from.
' print the value from column 3 in the range, etc.
Debug.Print xlApp.Vlookup(lookupValue, xlRange, 3, False)