Option Explicit: Option Compare Text
Function Classe(nom$, nbr#) As String
Dim n&, i&
n = Cells(Rows.Count, 1).End(3).Row: If n = 1 Then Exit Function
For i = 2 To n
With Cells(i, 1)
If .Value = nom Then
If nbr >= .Offset(, 1) And nbr < .Offset(, 2) _
Then Classe = .Offset(, 3): Exit Function
End If
End With
Next i
Classe = "erreur"
End Function