Can you use Text To Columns feature to be Text To Rows?

tinkerbell737

Board Regular
Joined
Nov 25, 2002
Messages
96
I have a cell that has a comma separated value that is 354 fields long. As such, if I use the Text To Columns feature to split the data at each column, I lose several columns (because excel cannot have that many columns).

How can I break the data at the comma, but have it list in rows instead?
 
Excel 2010
D
1"FirstName","LastName","MiddleInitial","HomeAddress","HomeCity","HomeState"
2
3FirstName
4LastName
5MiddleInitial
6HomeAddress
7HomeCity

<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
</tbody>
Turn Cell Into Rows and Columns

Worksheet Formulas
CellFormula
D3=MID(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:1)-1)*LEN(D$1)+1,LEN(D$1))),2,LEN(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:1)-1)*LEN(D$1)+1,LEN(D$1))))-2)
D4=MID(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:2)-1)*LEN(D$1)+1,LEN(D$1))),2,LEN(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:2)-1)*LEN(D$1)+1,LEN(D$1))))-2)
D5=MID(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:3)-1)*LEN(D$1)+1,LEN(D$1))),2,LEN(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:3)-1)*LEN(D$1)+1,LEN(D$1))))-2)
D6=MID(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:4)-1)*LEN(D$1)+1,LEN(D$1))),2,LEN(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:4)-1)*LEN(D$1)+1,LEN(D$1))))-2)
D7=MID(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:5)-1)*LEN(D$1)+1,LEN(D$1))),2,LEN(TRIM(MID(SUBSTITUTE(D$1,",",REPT(" ",LEN(D$1))),(ROWS($1:5)-1)*LEN(D$1)+1,LEN(D$1))))-2)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Say A1 = 1,2,3,4,5

=trim(mid(substitute(a$1,",",rept(" ",500)),row(a1)*500-499,500))

Excel 2010
AB
11,2,3,4,51
22
33
44
55

<tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
B1=TRIM(MID(SUBSTITUTE(A$1,",",REPT(" ",500)),ROW(A1)*500-499,500))
B2=TRIM(MID(SUBSTITUTE(A$1,",",REPT(" ",500)),ROW(A2)*500-499,500))
B3=TRIM(MID(SUBSTITUTE(A$1,",",REPT(" ",500)),ROW(A3)*500-499,500))
B4=TRIM(MID(SUBSTITUTE(A$1,",",REPT(" ",500)),ROW(A4)*500-499,500))
B5=TRIM(MID(SUBSTITUTE(A$1,",",REPT(" ",500)),ROW(A5)*500-499,500))

<tbody>
</tbody>

<tbody>
</tbody>
Thankyou this can be work for single row. But I've the 420 datas in Row A1 to Row A420. How can use this for the multiple rows?
 
Upvote 0
If this is a new question, you might want to post up a new thread with your sample data and how you want the result to look like.
 
Upvote 0
Edit the document using Word (or your favorite system editor). Replace , with ^n.

Hi Mark W. Can you explain a bit more about the next steps once commas are replaced by ^n? I don't understand how that solves the issue, but perhaps I'm missing something obvious. Thank you.
 
Upvote 0
Hi Mark W. Can you explain a bit more about the next steps once commas are replaced by ^n? I don't understand how that solves the issue, but perhaps I'm missing something obvious. Thank you.


Yeah.. I'm confused too.

Do you just mean replace all the commas in your data with ^N? I tried that, but when you go to do the text to columns it doesn't allow you to enter ^N. It only allows you to enter 1 character... Please clarify.
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,664
Members
449,114
Latest member
aides

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top