I have what should be a simple lookup but get a "Unable to get the VLookup property of the Worksheet Function Class 1004 error message
I'm trying to look up the fiscal year in which a reading date occurs.
I've simplified my code to get this going and to test...
Dim readingdate As Date
Dim FiscYr As Long
readingdate = Worksheets("data input").Range("B400")
FiscYr = Application.WorksheetFunction.VLookup(readingdate, Worksheets("Lookups").Range("B7:D19"), 3, False)
Can someone give help me to correct this please?
Thanks
Geoff
I'm trying to look up the fiscal year in which a reading date occurs.
I've simplified my code to get this going and to test...
Dim readingdate As Date
Dim FiscYr As Long
readingdate = Worksheets("data input").Range("B400")
FiscYr = Application.WorksheetFunction.VLookup(readingdate, Worksheets("Lookups").Range("B7:D19"), 3, False)
Can someone give help me to correct this please?
Thanks
Geoff