Solved

Formula to extract cell contents in front of manual line break

Posted on 2013-01-31
4
361 Views
Last Modified: 2013-01-31
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
0
Comment
Question by:AndreasHermle
  • 3
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38839389
=LEFT(B4,SEARCH(CHAR(10),B4)-1)

for example
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 38839419
Note that assumes there is always a line feed. Safer to use

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

:)
0
 

Author Closing Comment

by:AndreasHermle
ID: 38839479
Dear rorya:

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

Regards, Andreas
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38839586
Andreas,

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

Rory
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now