This is so frustrating. I can get the VBA Application.WorksheetFunction.VLookup to perform when the lookup value a string, but trying to use a date it continually gives me an error of: Runtime Error "1004" Unable to get the VLookup Property of the Worksheet Function Class
The code I am using is below:
Code
Sub ManHours()
Dim eDate As Date
Dim Lookup_Range As Range
Dim Pay_Rate As Single
eDate = #5/6/2017#
Set Lookup_Range = Worksheets("Sheet1").Range("B488:V518")
Pay_Rate = Application.WorksheetFunction.VLookup(eDate, Lookup_Range, 22, False)
MsgBox Pay_Rate
End Sub
Display More
I have also attached a test file I am using.
Regards,