Function Espaces(t As Variant) As Variant
'insère des espaces entre les textes et les nombres
Dim i%, x$, y$
If Not IsNumeric(t) Then
t = Replace(t, " ", "")
For i = Len(t) - 1 To 1 Step -1
x = Mid(t, i, 1): y = Mid(t, i + 1, 1)
If IsNumeric(x) And Not IsNumeric(y) _
Or IsNumeric(y) And Not IsNumeric(x) Then _
t = Application.Replace(t, i + 1, 0, " ")
Next
t = Replace(Replace(t, " .", "."), ". ", ".")
t = Replace(Replace(t, " ,", ","), ", ", ",")
End If
Espaces = t
End Function