Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Automated way of removing line breaks within a cell in Excel

Posted on 2014-03-24
3
Medium Priority
?
213 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 34

Accepted Solution

by:
Rob Henson earned 2000 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 34

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

824 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