I have created a user defined function that reads in a named range "Table" that consists of two columns. The first column contains integer ages from 15 to 70 and the second column is the number I need to manipulate. Here is a simplified version of it.
I am having speed issues and was wondering if there is a more efficient way to replace the vlookup function.
Code:
Function MyFunction(Age Table)
Dim MyRANGE As Range
Set MyRANGE = ThisWorkbook.Names(Table).RefersToRange
MyFunction = Application.VLookup(Age, MyRANGE, 2, False)
End Function
I am having speed issues and was wondering if there is a more efficient way to replace the vlookup function.