Separating number of lines from a cell

Danbrix

New Member
Joined
Nov 14, 2013
Messages
33
Hi

I hve a cell with as many as 100 lines and which can change depending on user input.

I can find how many lines there are using, but I want to separate the lines into different cells.

Is a way to separate number of lines just like we use mid, left and right with number of charaters?

Thanks
 
So these "lines" are separated by "linefeed", correct?

I can help with a formula solution, if you're interested.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
As the new lines are directly from a user, from a textbox, they can be line feeds as well as end of line. Just to be clear, either
1. It goes to the next line as there is no room for the following word or sentence or
2. It goes to the next line by pressing the enter key within the text box.
Thank you for your help.
 
Upvote 0
Well, as I'm uncertain "exactly" how the Cell is populated, this assumes Every line ends with a linefeed, see how it works for you...

Assuming Original data in A1, Formula in A2 copied down as far as needed:

=TRIM(MID(SUBSTITUTE(SUBSTITUTE(CHAR(10)&A$1,CHAR(10),REPT(" ",LEN(A$1)),ROWS(A$2:A2)*25-24),CHAR(10),REPT(" ",LEN(A$1)),ROWS(A$2:A2)*25),LEN(A$1)+ROWS(A$2:A2),LEN(A$1)))
 
Upvote 0

Forum statistics

Threads
1,216,069
Messages
6,128,600
Members
449,460
Latest member
jgharbawi

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