In Mac Excel, how can I replace with newline?
In Mac Excel, how can I replace with newline?
Ex:
Finds all
AAA BBB
and replace all with
AAA
BBB
Please any help would be highly appreciated.
Solution 1:
Manually Adding a Line Break
You can do this by pressing Option Enter at the point you want to insert the line break.
It's best that you format the cell(s) as Text to ensure the best results.
Mass Insert Line Break (a.k.a Search/Replace)
You can do this on a mass basis with Search & Replace. As before, it's important to format your cells as text. In the replace field, use the generic formula
="Text1"&CHAR(10)&"Text2"&CHAR(10)"Text3..."
- The text to be replaced in quotes (" ")
- & as the
concat
(concatenate) function -
CHAR(10)
as the symbol fornewline
Using this methodology, you can "fix" multiple lines of text (like an address). See the animation below for an example:
Solution 2:
You can use the Find & Replace
How to find or replace a line break in Excel for Windows
To replace a line break with a space or any other separator, enter the line break character in the Find what filed by pressing Ctrl + J. This shortcut is the ASCII control code for character 10 (line break, or line feed).
After pressing Ctrl + J, at first sight the Find what box will look empty, but upon a closer look you will notice a tiny flickering dot like in the screenshot below. Enter the replacement character in the Replace with box, e.g. a space character, and click Replace All. Replacing all line breaks on the sheet with spaces
To replace some character with a line break, do the opposite - enter the current character in the Find what box, and the line break (Ctrl + J) in Replace with.
Excellent instructions found here
Finding the equivalent in Excel for Mac.
Since I do not have Excel to verify it here is what I found for you to try.