Different result from match search and check directly cell()
问题 For the below problem I mistakenly asked for a review in C.R., but they told me not to be the right place, so I extend to you the same question. I cannot find answers alone. this very simple code return 2 different results, why ?!?! I'll be crazy... Function FirstDay(t As String) As Boolean d = DateSerial(Left(t, 4), Mid(t, 5, 2), Right(t, 2)) - 1 FirstDay = False Var = Application.Match(d, Worksheets("Diary").Columns(1), 0) If Not IsError(Var) Then FirstDay = True End If 'this only to check