Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
I have this line of code in my project that is giving me a "Unable to get the Match property of the WorksheetFunction class" ...
dln is defined as a variant (???)
td = NOW
The value I am getting for td is 5/7/2018 8:03:04 PM
The date data in workbook swb 2nd worksheet is formatted as ddd dd-mm, but is a true date value as indicated in the formula bar (5/7/2018).
I suspect the problem is that they can't match the two values becuase one has the time, the other doesn't so there isn't an exact match. If that is the case, how can I just isolate the date portion of NOW to use to find the match?
Code:
dln = WorksheetFunction.Match(td, swb.Worksheets(2).Range("B:B"))
dln is defined as a variant (???)
td = NOW
The value I am getting for td is 5/7/2018 8:03:04 PM
The date data in workbook swb 2nd worksheet is formatted as ddd dd-mm, but is a true date value as indicated in the formula bar (5/7/2018).
I suspect the problem is that they can't match the two values becuase one has the time, the other doesn't so there isn't an exact match. If that is the case, how can I just isolate the date portion of NOW to use to find the match?
Last edited: