dim zahlstr as string
zahl = 12345,67
wie bekomme ich diese Zahl zum beispiel so dargestellt: --- z,B. als string "12.345,67"dargestellt ?
zahlstr = str(zahl) ?
Vielen Dank für die Hilfe
Horst Falkert
Private Function FormatSpezial(zahl As Currency) As String
Dim tempZahl As String
Dim i As Byte
If zahl <> WorksheetFunction.RoundDown(zahl, 0) Then _
FormatSpezial = "," & Right(CStr(zahl - WorksheetFunction.RoundDown(zahl, 0)), Len(CStr(zahl - WorksheetFunction.RoundDown(zahl, 0))) - 2)
tempZahl = WorksheetFunction.RoundDown(zahl, 0)
Do While Len(tempZahl) > 3
FormatSpezial = "." & Right(tempZahl, 3) & FormatSpezial
tempZahl = Left(zahl, Len(tempZahl) - 3)
Loop
FormatSpezial = tempZahl & FormatSpezial
End Function
Sub zahl()
Dim zahl As Currency
Dim zahlstr As String
zahl = 12345,67
zahlstr = Format(Str(zahl), "#,##0,00")
End Sub