AW: Zellen teilen
06.10.2008 19:24:50
Chris
Servus Ben,
probier mal:
Sub t()
Dim i As Long, lngLetzte As Long, DatString As String, k As Long
Dim DatArray() As Variant, x As Long, lngStart As Long
lngLetzte = Cells(Rows.Count, 1).End(xlUp).Row
For i = 12 To lngLetzte
For k = 1 To Len(Cells(i, 1))
If Not IsNumeric(Mid(Cells(i, 1), k, 1)) Then
ReDim Preserve DatArray(x)
DatArray(x) = Mid(Cells(i, 1), k, 1)
lngStart = k + 1
Exit For
End If
Next k
DatString = DatArray(0)
For j = lngStart To Len(Cells(i, 1))
If Not IsNumeric(Mid(Cells(i, 1), j, 1)) Then
DatString = DatString & Mid(Cells(i, 1), j, 1)
Else
DatString = DatString & Mid(Cells(i, 1), j, 1) & Mid(Cells(i, 1), j + 1, 1)
Cells(i, 2) = DatString
x = 0
Exit For
End If
Next j
Next i
End Sub
macht er allerdings für alle Zeilen
Gruß
Chris