An implementation of Visual Basic that is built into Microsoft products.
using vlookup function at different sheets
Ce
21
Reputation points
Hello all,
i want to write a function by using vlookup function. Table which will be used by vlookup located at sheet 1 but input and output is at the sheet 2. When i run the function, function do not use table, instead of this, it try to use releted columns and rows at sheet 2. How can i fix this? My function as follows;
Function NameDiscount(vntName) As Double
Dim vntMy_range As Variant
NameDiscount = Application.WorksheetFunction.VLookup(vntName, Worksheets("Sheet1").Range("A:C"), 2, True)
End Function
Developer technologies | Visual Basic for Applications
Developer technologies | Visual Basic for Applications
Sign in to answer