R
rwertheimer
Hello,
I'm having trouble with the following piece of code -- it returns "0"
as startprice when it should not. I'm pretty sure the vlookup is not
working properly.
Any help is appreciated.
thanks,
rob
Function returnclose(numdays As Integer) As Long
' calculates return over period indicated by date entered and days in
left hand column
Dim startdate As Date
Dim startprice As Long
Dim enddate As Date
Dim endprice As Long
startdate = Range("startdate").Value
startprice = Application.VLookup(startdate, Range("OPWV_prices"),
2, False)
I'm having trouble with the following piece of code -- it returns "0"
as startprice when it should not. I'm pretty sure the vlookup is not
working properly.
Any help is appreciated.
thanks,
rob
Function returnclose(numdays As Integer) As Long
' calculates return over period indicated by date entered and days in
left hand column
Dim startdate As Date
Dim startprice As Long
Dim enddate As Date
Dim endprice As Long
startdate = Range("startdate").Value
startprice = Application.VLookup(startdate, Range("OPWV_prices"),
2, False)