VLOOKUP not working in VBA
These changes worked! Thank you both!!
"DogLover" wrote:
I am trying to perform at lookup in a defined range name=DemoEndDate.
Res comes back as blank. Is this the correct format?? Also, does anyone
know if this is the correct date format?
YY = Year(Worksheets("RFJ").Range("N8"))
MM = Month(Worksheets("RFJ").Range("N8"))
SDate = DateSerial(YY, MM, 1)
Dim YY As String
Dim MM As String
Dim SDate As Date
Res = Application.WorksheetFunction.VLookup(SDate, Range("DemoOEndDate"), 2,
False)
|