ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Parse Before Line Break (https://www.excelbanter.com/excel-worksheet-functions/214938-parse-before-line-break.html)

Josh O.

Parse Before Line Break
 
I could use some help making a formula to return all characters before a
carriage return [or an alt-enter or Char (10), depending on how you referr to
it].

The Cell has a lot of text in it and can have more than 1 carriage return in
it...

Any ideas?

Glenn

Parse Before Line Break
 
Josh O. wrote:
I could use some help making a formula to return all characters before a
carriage return [or an alt-enter or Char (10), depending on how you referr to
it].

The Cell has a lot of text in it and can have more than 1 carriage return in
it...

Any ideas?



=LEFT(A1,FIND(CHAR(10),A1)-1)

Rick Rothstein

Parse Before Line Break
 
If the text in A1 (or another cell if this formula is copied down) does not
have a Line Feed, your formula will error out. This is probably the simplest
fix to your formula for that possibility...

=LEFT(A1,FIND(CHAR(10),A1&CHAR(10))-1)

--
Rick (MVP - Excel)


"Glenn" wrote in message
...
Josh O. wrote:
I could use some help making a formula to return all characters before a
carriage return [or an alt-enter or Char (10), depending on how you
referr to it].

The Cell has a lot of text in it and can have more than 1 carriage return
in it...

Any ideas?



=LEFT(A1,FIND(CHAR(10),A1)-1)



Ashish Mathur[_2_]

Parse Before Line Break
 
Hi,

You can also use Data Text to columns. Select delimited and then click
Next. On the next screen, uncheck tab and check the "Other" box. In the
box next to Other, do the following

Alt+010 (on the numeric keypad)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Josh O." wrote in message
...
I could use some help making a formula to return all characters before a
carriage return [or an alt-enter or Char (10), depending on how you referr
to
it].

The Cell has a lot of text in it and can have more than 1 carriage return
in
it...

Any ideas?




All times are GMT +1. The time now is 01:59 AM.

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