ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Text to rows (https://www.excelbanter.com/excel-worksheet-functions/227894-text-rows.html)

Phippsy

Text to rows
 
I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?

Gary''s Student

Text to rows
 
Try this small macro:

Sub rowmaker()
v = ActiveCell.Value
s = Split(v, Chr(10))
For i = 0 To UBound(s)
ActiveCell.Offset(i + 1, 0).Value = s(i)
Next
End Sub

Select the cell and run the macro
--
Gary''s Student - gsnu200846


"Phippsy" wrote:

I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?


Luke M

Text to rows
 
Easiest method is usually to use the Data-Text to columns feature, then copy,
paste special - transpose data.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Phippsy" wrote:

I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?


Phippsy

Text to rows
 
This works very well thanks

"Gary''s Student" wrote:

Try this small macro:

Sub rowmaker()
v = ActiveCell.Value
s = Split(v, Chr(10))
For i = 0 To UBound(s)
ActiveCell.Offset(i + 1, 0).Value = s(i)
Next
End Sub

Select the cell and run the macro
--
Gary''s Student - gsnu200846


"Phippsy" wrote:

I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?


Phippsy

Text to rows
 
Thanks for this but becasue there is a forced line break there is no way I
can specify a separator unless I am misunderstanding what to do.

"Luke M" wrote:

Easiest method is usually to use the Data-Text to columns feature, then copy,
paste special - transpose data.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Phippsy" wrote:

I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?


Gord Dibben

Text to rows
 
To split at the forced line break in delimited byother hold the Alt key and
type 0010 on the numpad.


Gord Dibben MS Excel MVP

On Thu, 16 Apr 2009 06:56:11 -0700, Phippsy
wrote:

Thanks for this but becasue there is a forced line break there is no way I
can specify a separator unless I am misunderstanding what to do.

"Luke M" wrote:

Easiest method is usually to use the Data-Text to columns feature, then copy,
paste special - transpose data.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Phippsy" wrote:

I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?



Phippsy

Text to rows
 
Excellent thank you!

"Gord Dibben" wrote:

To split at the forced line break in delimited byother hold the Alt key and
type 0010 on the numpad.


Gord Dibben MS Excel MVP

On Thu, 16 Apr 2009 06:56:11 -0700, Phippsy
wrote:

Thanks for this but becasue there is a forced line break there is no way I
can specify a separator unless I am misunderstanding what to do.

"Luke M" wrote:

Easiest method is usually to use the Data-Text to columns feature, then copy,
paste special - transpose data.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Phippsy" wrote:

I have text in a cell which has been forced onto separate rows within the
same cell. Can I split this into several rows so there is one line in each
new row?





All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com