Re: Aus Text-Zahlengemisch den Text entfernen.
28.01.2003 10:34:55
haller
hallo martin,hier noch eine kleine vba-routine, die dir vielleicht hilft.
Dabei bist Du nicht auf die Form des Ausgangstextes angewiesen:
Sub zeichen_loeschen()
Dim ce As Range, stri As String, i As Integer
For Each ce In Selection.Cells
stri = ce.Text
For i = Len(stri) To 1 Step -1
If Mid(stri, i, 1) = "," Or Mid(stri, i, 1) = "." Then
Mid(stri, i, 1) = Application.International(xlDecimalSeparator)
End If
If IsNumeric(Mid(stri, i, 1)) = False And Mid(stri, i, 1) <> "," And Mid(stri, i, 1) <> "." Then
stri = Left(stri, i - 1) & Right(stri, Len(stri) - i)
End If
Next
ce.NumberFormat = "0.00 ""EUR"""
ce.Value = stri
Next
End Sub
gruß
olaf