The following code results in a 'type mismatch" when trying to calculate 'i' in both cases. The range wrng2 is depicted below, and the values are Date type.
Any help would be much appreciated.
VBA Code:
Dim i As Integer
Dim d As Date
d = #8/4/2019#
i = Application.Match(d, Range("wrng2").Value, -1)
d = Range("wrng2").Cells(7, 1).Value
i = Application.Match(d, Range("wrng2").Value, -1)
Any help would be much appreciated.