With Sheets("Tests")
Fin = .Range("a" & .Rows.Count).End(xlUp).Row
Déb = 4
For I = Déb To Fin
If Not IsNumeric(Left(.Cells(I, 1), 1)) Then GoTo suite
Tmp = Trim(.Cells(I, 1).Value)
For j = 1 To Len(Tmp)
Cherc = Mid(Tmp, j, Len(Tmp))
If Left(Cherc, 1) = "y" Then
Cherc2 = Left(Tmp, j - 2)
Exit For
End If
Next j
For K = 1 To Len(Cherc2)
Sepa = Mid(Cherc2, K, Len(Cherc2))
Sepa2 = Mid(Cherc2, K + 2, Len(Cherc2))
If Left(Sepa, 1) = "-" And Left(Sepa2, 1) = "." Then
Val = CDbl(Left(Cherc2, 1))
.Cells(I, 7) = Val
Exit For
ElseIf Left(Mid(Cherc2, K + 2, Len(Cherc2)), 1) = "+" Then
Val = CDbl(Left(Cherc2, 2))
.Cells(I, 7) = Val
Exit For
End If
If Left(Sepa, 1) = "." Then
Val = CDbl(Replace(Cherc2, ".", ","))
.Cells(I, 7).Value = CDbl(Val)
Exit For
ElseIf Left(Sepa, 1) = "-" Then 'And Left(Sepa, 3) = "." Then
Val = CDbl(Replace(Cherc2, "-", ","))
.Cells(I, 7).Value = CDbl(Val)
Exit For
ElseIf Left(Sepa, 1) = "_" Then
Val = CDbl(Replace(Cherc2, "_", ","))
.Cells(I, 7).Value = CDbl(Val)
Exit For
End If
If Len(Cherc2) = 1 Or Len(Cherc2) = 2 Then
Val = CDbl(Cherc2)
.Cells(I, 7).Value = CDbl(Val)
Exit For
End If
Next K
suite:
Next I
.Range("G" & Déb, "G" & Fin).NumberFormat = "#,##0.0"
End With
End Sub