Welche Version im Einsatz?
Beispiel:
Option Explicit
Sub main()
Debug.Print fTruncate("2,995", ",", 2)
End Sub
Function fTruncate(ByVal value As Variant, ByVal sDelimiter As String, ByVal lngAnzahl As Long) As Double
Dim v
If InStr(1, value, sDelimiter, vbBinaryCompare) > 0 Then
v = Split(value, sDelimiter)(0) & sDelimiter & Left(Split(value, sDelimiter)(1), lngAnzahl)
fTruncate = CDbl(v)
End If
End Function
|