Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
how to find a line break in excel?
hi there. I have a cell with 4 lines of text in it. I'd like to write a formula that looks for all text between line breaks, and puts that text into a single cell. I know how to use "FIND" to search for a particular text string, and RIGHT, MID and LEFT functions to grab text of a certain length, but I want to basically find everything before or after or between line breaks. any help is appreciated!
3 Answers
- aladouLv 51 decade agoFavorite Answer
This will find the position of a line break in A1:
=FIND(CHAR(10), A1)
If you need more info, add more details or e-mail.
Good luck.
.
- Blessèd™Lv 41 decade ago
If all you want to do is to "display" those 4 lines of text as 1 line then turn off text "Wrapping" for that cell. This will display the cell content as one line but retains the line breaks.
If you want to convert those 4 lines of text into 1 line of text, then the following formulas will replace the line breaks "carriage returns" with spaces.
In the cell where you want the new text type in one of the following formula:
=SUBSTITUTE(A999, CHAR(10), " ")
=SUBSTITUTE(A999, CHAR(10), CHAR(32))
NOTE: In the formula above, A999 represents the cell where your multi-line text is located.
In Excel the numeric value or Code for a line break, aka "carriage return", is 10; and the numeric value or Code for a space is 32.
The function CHAR() returns the character specified by the code/value.
- Anonymous5 years ago
Simple ... Insert a column to the right and to the left of the lines. Then put <br> in the beginning and the end of all lines. Now copy the whole thing in a Notepad. The below were 4 Col and 4 Rows in Excel, which now appear like this in Notepad. (Can insert one more <br> column in between if you need) <br> 132 564 <br> <br> 321 545 <br> <br> 321 5465 <br> <br> 1321 231 <br> Tabs will still be there between the cells. Do a Replace all by "Ctrl+H". Select and copy the tab space between any two (like between: <br>"-- Tab Space-- "132). Then replace with nothing. Above will now look like: <br>132564<br> <br>321545<br> <br>3215465<br> <br>1321231<br>