Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,616
- Office Version
- 365
- 2016
- Platform
- Windows
What could be possible reasons why this code is failing to find a match? I get an error (Unable to get the Match property of the WorksheetFunction class) with the line in red.
The value for date_inq = 2024-02-01
In the worksheet (ws_cupe), cell B39 has a value of 2024-02-01 (formatted as 02-Feb-24)
The value for date_inq = 2024-02-01
In the worksheet (ws_cupe), cell B39 has a value of 2024-02-01 (formatted as 02-Feb-24)
Rich (BB code):
Sub Button1_Click()
Dim date_today As Date
Dim date_inq As Date
Dim r_dateinq As Double
date_today = Now
date_inq = Date + 1
Debug.Print date_today
Debug.Print date_inq
With ws_cupe
r_dateinq = Application.WorksheetFunction.Match(date_inq, .Columns(2), 0)
End With
End Sub