AW: Textimport
23.09.2006 12:27:55
Reinhard
Hi Jörg,
trenne erstmal beim Import nach "_", dann starte das Makro.
Option Explicit
Option Base 1
Sub tt()
Dim zei As Long, Kurz, spa, spalten, n, Merker(), nn
Const Trenn As String = "\"
For zei = 1 To Range("a65536").End(xlUp).Row
For spa = 1 To Cells(zei, 256).End(xlUp).Column
ReDim Preserve Merker(spa)
Merker(spa) = Cells(zei, spa)
Next spa
Rows(zei).ClearContents
For n = 1 To UBound(Merker)
Kurz = Split(Merker(n), Trenn)
For nn = 0 To UBound(Kurz)
spalten = Cells(zei, 256).End(xlToLeft).Column + 1
If spalten = 2 And Cells(zei, 1) = "" Then spalten = 1
Cells(zei, spalten) = Kurz(nn)
Next nn
Next n
Next zei
End Sub
Gruß
Reinhard
ps: Ich freue mich über eine Rückmeldung ob diese Antwort hilfreich war oder nicht..