Solved

Automated way of removing line breaks within a cell in Excel

Posted on 2014-03-24
3
202 Views
Last Modified: 2014-03-24
I have inherited a large spreadsheet which contains a significant number of line breaks (using ALT + ENTER) within the cells of several columns of text. I am looking for a macro or automated way to remove all line breaks within cells so that the text wraps properly. I couldn't find anything in the "Find & replace" feature to address this...

Thanks!
Andrea
0
Comment
Question by:Andreamary
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 39951003
You can do with formulas in another column:

=SUBSTITUTE(C3,CHAR(10),"")

The ASCII code for "Carriage Return" is 10 so this will substitute all CRs with "". Might be worth changing to " " (Space) instead otherwise last word on one line will be concatenated with first word on the next.

Thanks
Rob H
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 39951006
Or using Find and Replace:

In the find box press Alt and type 010
In the replace type a space

Thanks
Rob H
0
 

Author Closing Comment

by:Andreamary
ID: 39951198
Perfect. And I followed your advice on building in the " " (space). Thanks for your quick response...

Andrea
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As freelancing is becoming more and more common in the tech industry, certain obstacles are proving to be a challenge to those who are used to more traditional, structured employment. This article is meant to help identify such obstacles and offer a…
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

776 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