Importing CSV file into single column/multiple rows vs. multiple rows/single column

  • Thread starter Thread starter bjorgenson
  • Start date Start date
B

bjorgenson

Hello, I need to know how to import data into a single column with
multiple rows. By default, when importing a CSV or TAB txt file, it
imorts data across multiple columns in one row but I need it to go into
one column and multiple rows. I don't have the option on the import
wizard.

Thanks,
Brian
 
Brian,

Open it as usual, then do a copy pastespecial transpose.

HTH,
Bernie
MS Excel MVP
 
Hello, I need to know how to import data into a single column with
multiple rows. By default, when importing a CSV or TAB txt file, it
imorts data across multiple columns in one row but I need it to go into
one column and multiple rows. I don't have the option on the import
wizard.

Thanks,
Brian



An example of a CSV going into one column,
multiple rows (but note complete lack of
error handling):




Sub Example()

Dim i
Dim sTemp As String

i = FreeFile

Open "C:\MyFile.txt" For Input As #i
n = 0
Do While Not EOF(i)
Input #i, sTemp
ActiveCell.Offset(n, 0) = sTemp
n = n + 1
Loop
Close #i

End Sub
 
Back
Top