Function Prim(D as Date)
Dim tablo(), i%, MinTime: MinTime = 1
Application.Volatile
tablo = Range("A2:D" & Range("A65500").End(xlUp).Row)
For i = 1 To UBound(tablo)
If DateValue(tablo(i, 1)) = D And tablo(i, 2) <> "" Then
If TimeValue(tablo(i, 2)) < MinTime Then MinTime = TimeValue(tablo(i, 2))
End If
Next i
Prim = Format(MinTime, "hh:mm:ss")
End Function
Function Der(D As Date)
Dim tablo(), i%, MaxTime: MaxTime = 0
Application.Volatile
tablo = Range("A2:D" & Range("A65500").End(xlUp).Row)
For i = 1 To UBound(tablo)
If DateValue(tablo(i, 1)) = D And tablo(i, 3) <> "" Then
If TimeValue(tablo(i, 3)) > MaxTime Then MaxTime = TimeValue(tablo(i, 3))
End If
Next i
Der = Format(MaxTime, "hh:mm:ss")
End Function