lior03
05-10-2006, 09:15 AM
hello
i have a table looking like this:
namepricemoshe20ron30gila40ruth320
i am trying to use it so by inserting a name i will get the price and then multply it by a quantity i specified.
my function look like this:
Function windbag(name As String, quantity As Integer)
Dim Table As Range
Dim Price As Integer
Set Table = Sheets("product").Range("e5:f9")
Price = Application.WorksheetFunction.VLookup(Price, Table, 2)
windbag = quantity * Price
End Function
what went wrong?
thanks
i have a table looking like this:
namepricemoshe20ron30gila40ruth320
i am trying to use it so by inserting a name i will get the price and then multply it by a quantity i specified.
my function look like this:
Function windbag(name As String, quantity As Integer)
Dim Table As Range
Dim Price As Integer
Set Table = Sheets("product").Range("e5:f9")
Price = Application.WorksheetFunction.VLookup(Price, Table, 2)
windbag = quantity * Price
End Function
what went wrong?
thanks