Public Function numeric(cellule As Range) As Double
Dim i As Byte
Dim t As String
For i = 1 To Len(cellule)
If IsNumeric(Mid(cellule, i, 1)) Then t = t & Mid(cellule, i, 1)
Next i
numeric = CDbl(t)
End Function
Formule à tirer vers le bas.=si(estnum(D5)=VRAI;D5;"")
Function NombreDansChaine(c As String) As Double
Dim oRegExp As Object
Set oRegExp = CreateObject("vbscript.regexp")
If IsNumeric(c) Then NombreDansChaine = c: Exit Function
With oRegExp
.Global = True
.Pattern = "[^0-9]"
If .test(c) Then NombreDansChaine = .Replace(c, "")
End With
End Function
=SIERREUR(ESTNUM(A1)*A1;"")
=SIERREUR(PETITE.VALEUR(D:D;LIGNE());"")