Magic_Doctor
XLDnaute Barbatruc
VB:
Function Nbzero(c As Range) As Byte
'***********************************************
'Renvoie le nombre de 0 juste après la virgule
'***********************************************
'Ex : 2,20075 --> 0
' 2,00054084 --> 3
If Not IsNumeric(CStr(c)) Then Exit Function
Dim x$, deb%, i%
x = Format(c, "0." & String(999, "0"))
deb = InStr(x, Application.DecimalSeparator) + 1
For i = deb To Len(x)
If Mid(x, i, 1) <> "0" Then Nbzero = i - deb: Exit Function
Next
End Function
Dernière édition: