Function TantDeChiffresAprèsVirgule$(x, dec, Optional pref = "", Optional suf = "")
If IsError(x) Or IsError(dec) Then Exit Function
dec = Abs(Int(Val(dec)))
TantDeChiffresAprèsVirgule = pref & Format(x, "0" & IIf(dec, "." & String(dec, "0"), "")) & suf
'---quand la fonction est appelée par macro---
If TypeName(Application.Caller) <> "Range" Then _
If IsNumeric(TantDeChiffresAprèsVirgule) Then _
TantDeChiffresAprèsVirgule = "'" & TantDeChiffresAprèsVirgule
End Function