Formula to extract cell contents in front of manual line break

Dear Experts:

I got hundreds of cells in a column with manual line breaks (Alt + Enter). I wonder whether it is possible to extract the cell contents in front of the manual line breaks using VBA code or a formula.

I have attached a sample for your convenience.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas

Formula-Extracting-Text-Before-M.xlsx
Andreas HermleTeam leaderAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rory ArchibaldConnect With a Mentor Commented:
Note that assumes there is always a line feed. Safer to use

=IFERROR(LEFT(B4,SEARCH(CHAR(10),B4)-1),B4)

:)
0
 
Rory ArchibaldCommented:
=LEFT(B4,SEARCH(CHAR(10),B4)-1)

for example
0
 
Andreas HermleTeam leaderAuthor Commented:
Dear rorya:

I sure love this forum. Thank you very much for your swift and professional support.

Regards, Andreas
0
 
Rory ArchibaldCommented:
Andreas,

You are most welcome. It is always a pleasure to deal with you :)

Rory
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.