Sub TestR()
Dim T1, T2, i As Long, j As Long, k As Long, TR, Result As Integer, Ind As Integer
With Worksheets("Feuil1")
T1 = .Range("D2:H" & .Range("D" & Rows.Count).End(xlUp).Row - 1)
T2 = .Range("Q2:Q" & .Range("Q" & Rows.Count).End(xlUp).Row)
TR = Array("H", "E", "F", "B", "G", "C", "D", "A")
For i = 1 To UBound(T2, 1)
Result = 0
For j = 1 To UBound(T1, 1)
If T2(i, 1) = T1(j, 1) Then
For k = 2 To UBound(T1, 2)
If T1(j, k) > 0.25 Then
Result = Result + 2 ^ (k - 1)
End If
Next
Exit For
End If
Next
If Result = 0 Then
T2(i, 1) = " - - "
Else
Ind = IIf(Result >= 16, (Result - 16) / 2, Result / 2)
T2(i, 1) = " Résistance " & TR(Ind)
End If
Next
.Range("AA2").Resize(UBound(T2), 1) = T2
End With
End Sub