Hello, I am trying to import a txt file into excel 2003.
My problem is that i can't figure out how to make excel understand that the txt file is column based.
I want to import the data exactly as i see them in txt, as a table.
I searched in here, but the other posts did not help meCode:Sub OpenFile() Dim A As Long, B As String, C As Variant, D As Variant, E As Variant Dim iRow As Long Dim i As Long Dim Fname As Variant Fname = Application.GetOpenFilename("Text Files (*.txt),*.txt", , _ "Select Text Data File") If Fname = False Then Exit Sub Open Fname For Input As #1 iRow = 1 i = 1 Do While Not EOF(1) Input #1, A Cells(1, i) = A 'iRow = iRow + 1 i = i + 1 Loop Close 1 End Sub




Reply With Quote