Function RAS(valeur, operateur, dat As Long) As String
If valeur = "" Or operateur = "" Or dat = 0 Then Exit Function
Dim tablo, i As Long, der As Long
tablo = Application.Caller.Parent.UsedRange.Resize(, 3) 'tableau VBA, plus rapide
operateur = UCase(operateur) 'majuscules, au cas où...
For i = 1 To UBound(tablo)
If UCase(tablo(i, 2)) = operateur And tablo(i, 3) < dat Then If tablo(i, 3) > der Then der = tablo(i, 3)
Next
RAS = IIf(Sgn(der) * (dat - der) < 180, "RAS", "Voir responsable")
End Function