To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break.
-
Double-click the cell in which you want to insert a line break.
-
Click the location inside the selected cell where you want to break the line.
-
Press Alt+Enter to insert the line break.
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press CONTROL + OPTION + RETURN to insert a line break.
-
Double-click the cell in which you want to insert a line break.
-
Click the location inside the selected cell where you want to break the line.
-
Press CONTROL+OPTION+RETURN to insert the line break.
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break.
-
Double-click the cell in which you want to insert a line break (or select the cell and then press F2).
-
Click the location inside the selected cell where you want to break the line.
-
Press Alt+Enter to insert the line break.
-
Double-tap within the cell.
-
Tap the place where you want a line break, and then tap the blue cursor.
-
Tap New Line in the contextual menu.
Note: You cannot start a new line of text in Excel for iPhone.
-
Tap the keyboard toggle button to open the numeric keyboard.
-
Press and hold the return key to view the line break key, and then drag your finger to that key.
Содержание
- Start a new line of text inside a cell in Excel
- Need more help?
- Start a new line of text inside a cell in Excel
- Need more help?
- How To Add A New Line In Excel?
- How do you insert a new line?
- How do I add a line between rows in Excel?
- Why does Alt Enter not working Excel?
- How do you go to a new line character in Excel?
- How do I replace a comma in a new line in Excel?
- How do I enter a new line in an Excel cell Mac?
- How do I enable Alt Enter in Excel?
- Why Ctrl Shift Enter in Excel?
- How do I insert a new line in Find and Replace?
- How do you find and replace in new line?
- How do I change a semicolon to a new line in Excel?
- How do I indent the second line in Excel?
- How do you use Alt Enter?
- What is an Xlookup in Excel?
- What is the code for a line break in Excel?
- What are line breaks in Excel?
- How do I add a new line in Sublime Text?
- How do you add a new line in atom?
- Insert a New Line in an Excel Cell
- Enter a New Line
- Use Formulas to Insert a New Line
- Formatting Cells to Display a New Line
- New Line in an Excel Cell
- Insert a New Line in an Excel Cell
- Top 3 Ways to Insert a New Line in a Cell of Excel
- #1 – Using the Shortcut Keys “Alt+Enter”
- #2–Using the “CHAR(10)” Formula of Excel
- #3–Using the Named Formula [CHAR(10)]
- Frequently Asked Questions
- Recommended Articles
Start a new line of text inside a cell in Excel
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break.
Double-click the cell in which you want to insert a line break.
Click the location inside the selected cell where you want to break the line.
Press Alt+Enter to insert the line break.
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press CONTROL + OPTION + RETURN to insert a line break.
Double-click the cell in which you want to insert a line break.
Click the location inside the selected cell where you want to break the line.
Press CONTROL+OPTION+RETURN to insert the line break.
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break.
Double-click the cell in which you want to insert a line break (or select the cell and then press F2).
Click the location inside the selected cell where you want to break the line.
Press Alt+Enter to insert the line break.
Double-tap within the cell.
Tap the place where you want a line break, and then tap the blue cursor.
Tap New Line in the contextual menu.
Note: You cannot start a new line of text in Excel for iPhone.
Tap the keyboard toggle button to open the numeric keyboard.
Press and hold the return key to view the line break key, and then drag your finger to that key.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
Источник
Start a new line of text inside a cell in Excel
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break.
Double-click the cell in which you want to insert a line break.
Click the location inside the selected cell where you want to break the line.
Press Alt+Enter to insert the line break.
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press CONTROL + OPTION + RETURN to insert a line break.
Double-click the cell in which you want to insert a line break.
Click the location inside the selected cell where you want to break the line.
Press CONTROL+OPTION+RETURN to insert the line break.
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break.
Double-click the cell in which you want to insert a line break (or select the cell and then press F2).
Click the location inside the selected cell where you want to break the line.
Press Alt+Enter to insert the line break.
Double-tap within the cell.
Tap the place where you want a line break, and then tap the blue cursor.
Tap New Line in the contextual menu.
Note: You cannot start a new line of text in Excel for iPhone.
Tap the keyboard toggle button to open the numeric keyboard.
Press and hold the return key to view the line break key, and then drag your finger to that key.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
Источник
How To Add A New Line In Excel?
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break. Double-click the cell in which you want to insert a line break.
How do you insert a new line?
To add spacing between lines or paragraphs of text in a cell, use a keyboard shortcut to add a new line. Click the location where you want to break the line. Press ALT+ENTER to insert the line break.
How do I add a line between rows in Excel?
Select the cells where the empty rows need to appear and press Shift + Space. When you pick the correct number of rows, right-click within the selection and choose the Insert option from the menu list. Tip. If your cells contain any formatting, use the Insert Options icon to match the format.
Why does Alt Enter not working Excel?
Try using Alt+Enter with one Alt key and then with the other to see if you get different results. If the Alt+Enter problem is exhibited on all the workbook on your system, then try using Alt+Enter in other programs, such as Word.Check to see if the issue is with both Alt keys on the keyboard or with only one.
How do you go to a new line character in Excel?
To show text on separate lines in an Excel worksheet cell, use a shortcut, Alt+Enter, to add a line break.
Here are the steps to add a line break in a cell:
- Select the cell.
- In the Formula Bar, click where you want the line break.
- Press Alt + Enter, to add the line break.
- Press Enter, to complete the change.
How do I replace a comma in a new line in Excel?
Excel : Replace comma to line break
- Selected the range of cells I needed to replace.
- Go to Home > Find & Select > Replace or Ctrl + H.
- Find what: ,
- Replace with: CTRL + SHIFT + J.
- Click Replace All.
- Hooray here i got my result as below.
How do I enter a new line in an Excel cell Mac?
How to start a new line in Excel cell. The fastest way to create a new line within a cell is by using a keyboard shortcut: Windows shortcut for line break: Alt + Enter. Mac shortcut for line feed: Control + Option + Return or Control + Command + Return.
How do I enable Alt Enter in Excel?
Why Ctrl Shift Enter in Excel?
The use of Ctrl Shift-Enter together helps in converting the data into an array format which consists of multiple data values in excel. It also supports in differentiation between the regular formula and array formula.
How do I insert a new line in Find and Replace?
How to add line break to search and replace
- Do CTRL-H to bring up the Find & Replace dialog.
- Click on “More Options” (bottom left button)
- Make sure “Regular expressions” is checked/selected.
- Then in your “Search for” box, enter: | | * and in the “Replace with” enter: | | n*
How do you find and replace in new line?
- Open Find and Replace Option ( Ctrl + Alt + F in Mac )
- Type n in find input box.
- Click on Find All button, This will select all the n in the text with the cursor.
- Now press Enter, this will replace n with the New Line.
How do I change a semicolon to a new line in Excel?
Select the cells containing the commas you need to replace with newlines, then press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window. 3. Press the F5 key or click the Run button to run the code. Then all commas in selected cells are replaced with newlines immediately.
How do I indent the second line in Excel?
Indenting Individual Lines of Text in a Cell
- Select the desired cell(s).
- Turn on “Wrap Text” using the instructions above.
- Click your cursor into the desired cell.
- Type the desired text. To go to a new line, press [Alt]+[Enter].
- To indent individual lines of text, use the space bar to insert the desired space.
How do you use Alt Enter?
Summary. When you run an application in a console window, you can press ALT+ENTER to switch the console into full screen view. The application running in the console window is displayed in full screen. NOTE: ALT+ENTER only switches to full screen on x86 machines.
What is an Xlookup in Excel?
Use the XLOOKUP function to find things in a table or range by row.With XLOOKUP, you can look in one column for a search term, and return a result from the same row in another column, regardless of which side the return column is on.
What is the code for a line break in Excel?
10
The character code for a line break in Excel varies depending on the platform. On Windows, the code is 10 and on a Mac it’s 13. Note: make sure you have Wrap Text enabled on cells that contain line breaks. In Excel 365, both Win and Mac versions of Excel use CHAR(10) as a line break.
What are line breaks in Excel?
A line break in Excel can be used to end the current line and start a new line in the same cell (as shown below).
Inserting a Line Break Using a Keyboard Shortcut
- Double-click on the cell in which you want to insert the line break (or press F2).
- Place the cursor where you want the line break.
How do I add a new line in Sublime Text?
To insert a new line below the current line in your code, hit Cmd–Return (Mac) or Ctrl–Enter(Windows). You can also insert a new line above the current line by using Cmd–Shift–Return(Mac) or Ctrl–Shift–Enter (Windows).
How do you add a new line in atom?
If there was a Markup button, it seems to be gone in later versions of Atom.
What worked for me:
- I just added a new line at the end of the file.
- Shift + How do I replace text with a new line in Word?
Remove Line Breaks in Word Using Find and Replace
- Go to the Home tab and, in the Editing group, select Replace. Or, press Ctrl+H to open the Find and Replace dialog box.
- In the Find what text box, enter ^p^p (the letter p must be lower case).
- In the Replace with text box, enter ^p.
- Select Replace All or Replace.
Источник
Insert a New Line in an Excel Cell
Enter a New Line
If you want to insert a new line (line break) when typing into an Excel cell, the simplest way is to:
Position the curser in the cell, at the point where you want the new line to be inserted.
Press the keyboard shortcut:
I.e. press the Alt key and while holding this down, press the Enter (or Return) key.
Use Formulas to Insert a New Line
When working with Excel formulas you can insert a new line into an Excel cell using the Excel Char function. The line break character is represented by character number 10. Therefore, a new line can be inserted into a cell using the function:
The example below uses the & operator and the Char function to insert a line break between two text strings:
A | |
---|---|
1 | =»John Smith» & CHAR( 10 ) & «3 Carlton Road» |
A | |
---|---|
1 | John Smith 3 Carlton Road |
Formatting Cells to Display a New Line
For a new line to be displayed in an Excel cell, the Wrap Text option must be enabled. In recent versions of Excel (2007 and later), this can be controlled by the Wrap Text button, which is located in the ‘Alignment’ group of the Home tab of the Excel ribbon (see below).
The Wrap Text option can also be controlled from within the Format Cells dialog box. Therefore, if you have an older versions of Excel, which does not have the shortcut button, you can wrap text as follows:
- Select the cell(s) that you want to wrap text in;
Open the ‘Format Cells’ dialog box.
(The easiest way to do this is to use the keyboard shortcut Ctrl + 1 — i.e. press the Ctrl key and while holding this down press 1).
For more information on the Wrap Text option, see the Wrap-Text-In-Excel page.
Источник
New Line in an Excel Cell
Insert a New Line in an Excel Cell
A new line in excel cell is inserted when one needs to move a string to the next line of the cell. To insert a new line, a line break must be added at the relevant place. A line break tells Excel to break the existing line and begin a new line (within the same cell) with the immediately following character. When line breaks are inserted in a cell, its content can be seen in multiple lines.
For example, in the following image, a line break has been inserted after the cities Bangalore and Mysore. So, a total of two line breaks have been inserted in cell A1. Notice that the three cities are in three different rows of the same cell.
Starting a new line in an excel cell ensures that the lengthy text strings are split into multiple lines. This improves the readability and lends a neat look to the worksheet. To obtain the right result after inserting line breaks, ensure that the wrap text feature of Excel is turned on.
Table of contents
Top 3 Ways to Insert a New Line in a Cell of Excel
The methods to start a new line in a cell of Excel are listed as follows:
- Shortcut keys “Alt+Enter”
- “CHAR(10)” formula of Excel
- Named formula [CHAR(10)]
Let us consider an example of each technique.
Note: The line feed (LF) and carriage return Carriage Return Carriage Return in excel cell is a way to shift to a new line within the same cell. This could be treated as a line breaker which fits in huge data in an organized manner within one cell. read more (CR) are two terms closely related to a line break. The LF moves the cursor to the next line within the cell. In contrast, a CR moves the cursor to the beginning (or the first position) of the same line. So, with a CR alone, the cursor does not move to the next line.
Every operating system considers a line break (LF or CR or a combination of CR and LF) differently. For instance, when a line break is inserted in the Windows operating system, both CR and LF (called CR+LF or CRLF) are inserted together.
The CRLF moves the cursor to the beginning of the next line. However, the “Alt+Enter” method inserts only line feeds in Excel. The ASCII (American Standard Code for Information Interchange) codes for LF and CR are 10 and 13 respectively.
In this article, the usage of code 10 has been shown in example #2. Further, this article uses the term line break in place of line feed and carriage return. Hence, consider all three (line break, line feed, and carriage return) to be the same in this article.
#1 – Using the Shortcut Keys “Alt+Enter”
The following image shows the names of three cities of India in cell A1. We want to insert a line break after the first two cities of this cell. Use the keys “Alt+Enter” of Excel.
The steps to insert line breaks by using the keys “Alt+Enter” are listed as follows:
Step 1: Double-click inside cell A1. Next, move and bring the cursor immediately before the “M” of Mysore. To do this, either move the cursor with the arrow keys of the keyboard or click at the stated position with the left-click of the mouse.
The cursor is placed before Mysore because a line break needs to be inserted at this position.
Note: Alternatively, one can also place the cursor at the stated position in the formula bar.
Step 2: Press the keys “Alt+Enter.” For this shortcut to work, hold the “Alt” key while pressing the “Enter” key.
A new line is inserted before “Mysore,” as shown in the following image.
Step 3: Place the cursor before the “M” of Mumbai by using the left-click of the mouse. Press the keys “Alt+Enter,” the way they were pressed in the preceding step.
The name “Mumbai” shifts to a new line within the same cell of Excel. This is shown in the following image.
Step 4: Press the “Enter” key to exit the Edit mode. The following image shows the names of the three cities in multiple lines of a single cell (cell A1) of Excel. This result will be displayed only if the wrap text feature of Excel is turned on.
Notice that the formula bar (in the following image) shows a line break after Bangalore.
Note: The “wrap text” is a toggle button in the “alignment” group of the Home tab. It can also be accessed from the “alignment” tab of the “format cells” window. This window can be opened by pressing the shortcut “Ctrl+1.”
By default, the wrap text feature is turned on when a line break is inserted with the “Alt+Enter” method in Excel. To cross-check, keep cell A1 selected and notice that the “wrap text” button is automatically activated after inserting a line break with the shortcut keys.
If the wrap text button is turned off, the content of cell A1 will display in a single line. However, the line breaks will still be visible in the formula bar.
#2–Using the “CHAR(10)” Formula of Excel
The following image shows the names and addresses of some people. The first and the last names have been split into columns A and B respectively. The address has been split into columns C to G. We want to perform the following tasks:
- Join the first and the last name to the full address of each person. For this, combine the strings of columns A and B with those of columns C to G. Use the ampersand (&) to join the stated strings. Ensure that a single space character precedes each string of the address.
- Insert a line break between the last name and the first character of the address. Use the CHAR function for inserting line breaks.
In the end, the complete name should be in one line, followed by the address in the subsequent lines of the cell. Further, use a single formula for performing the given tasks. Explain the formula used.
Step 1: Insert a new column to the right of the given dataset. We have inserted column H titled “full address.” This is shown in the following image.
Step 2: Begin by combining the first and last names (of row 2) with the ampersand. To do this, type the following formula in cell H2.
This formula joins the first and the last names of cells A2 and B2 and also inserts a space between them. However, the formula is currently incomplete.
Step 3: Extend the preceding formula to include the CHAR function. Open this function by typing “CHAR,” followed by the opening parenthesis.
The opening of the CHAR function is shown in the following image.
Step 4: Insert the number 10 within the CHAR function. The “CHAR(10)” formula inserts a line break in Excel.
Note: The syntax of the CHAR function is “CHAR(number).” This function returns a character when a number between 1 and 255 is entered. The character is returned from the character set of the user’s computer.
Earlier, the Windows operating system used the ASCII and the ANSI character sets, which have now been replaced by Unicode. The ASCII stands for American Standard Code for Information Interchange. The ANSI character set was created by the American National Standard Institute.
In contrast, the Macintosh operating system uses the Macintosh character set. So, the Macintosh users may use the formula “CHAR(13)” to insert a line break in Excel.
Step 5: Insert the cell references to be joined with the strings of cells A2 and B2. So, in cell H2, enter the following formula by excluding the beginning and ending double quotation marks.
Press the “Enter” key. The output appears in cell H2. The formula and the output are shown in the following image. The output is not fully visible as it is in a single line of cell H2 of Excel.
Explanation of the formula: The preceding formula joins the first and the last names (in cells A2 and B2) with the entire address of a person (in cells D2, E2, F2, and G2). The ampersand (&) is used to join.
Notice that, in the formula, a space character has been inserted preceding the strings of cells D2, E2, F2, and G2. This space character is inserted within double quotation marks (like “ ”). These spaces of the formula ensure that spaces are inserted as separators in the output. Moreover, the separators are inserted at exactly those places (in the output) where they have been entered in the formula.
However, no space is inserted between the strings of cells B2 and C2. Rather, the “CHAR(10)” has been used in place of a space. This is because the “CHAR(10)” moves the immediately following string (of cell C2) to the next line.
Step 6: Activate the wrap text feature of Excel to see the entire content of cell H2. So, select cell H2 and click the “wrap text” button in the “alignment” group of the Home tab.
The output is shown in the following image. The full name and the complete address are visible in cell H2. Not only the strings of cells A2 to G2 have been joined, but a line break has also been inserted after the name (James Butt). As a result, a legible output has been obtained in cell H2.
Note: When a line break is inserted by the CHAR function, the wrap text feature of Excel is not turned on by default. Rather, this feature needs to be enabled manually to see the impact of the line break.
Step 7: Drag the formula of cell H2 till cell H8 by using the fill handle. The fill handle is displayed at the bottom-right corner of cell H2.
The dragging of the fill handle and the outputs are shown in the following image. Hence, the names and addresses have been consolidated neatly in column H.
#3–Using the Named Formula [CHAR(10)]
Working on the dataset of example #2, we want to perform the following tasks:
- Assign the name “NL” to the “CHAR(10)” formula. By doing this, “CHAR(10)” becomes a named formula.
- Add the comment “new line inserter” to the name “NL.”
- Show how to use the name “NL” (representing the named formula) in the ampersand and CHAR formula of example #2. Explain the formula thus used.
Use the “define name” property of Excel for the first two bullet points.
The steps to perform the given tasks by using the named formula are listed as follows:
Step 1: Click “define name” from the “defined names” group of the Formulas tab. This option is shown in the following image.
Step 2: The “new name” window opens, as shown in the following image. Make the following insertions in this window:
- In the “name” box, enter the name “NL.”
- In the “scope” box, let the option “workbook” remain selected.
- In the “comment” box, enter the string “new line inserter.”
- In the “refers to” box, enter the formula “=CHAR(10).”
Ensure that the insertions of points “a,” “c,” and “d” are entered without the beginning and ending double quotation marks. Click “Ok” once the insertions are done.
Note 1: The name and the comment cannot exceed 255 characters in length. The name must begin with a letter, underscore (_) or backslash (). Further, the name should not consist of any space characters.
Step 3: Use “NL” in place of “CHAR(10)” in the following formula.
Press the “Enter” key. The outputs are shown in the following image.
Note: When the “N” of “NL” is typed in the formula, Excel shows the name (NL) as well as the comment (new line inserter) in a list of suggestions. To select “NL” from this list, just double-click it.
Explanation of the formula: The outputs of the preceding formula are the same as that of example #2 (in step 7). This is because other than the name “NL,” the formulas of the two examples (examples #2 and #3) are the same.
Since “CHAR(10)” has been named “NL,” we have used this name in the formula instead of the CHAR function. The “wrap text” feature has also been applied to cell H2. This is the reason its content has fitted into multiple lines of cell H2 of Excel.
Notice that using a different name for “CHAR(10)” has not impacted the result. Rather, using the name “NL” has made the preceding formula compact and understandable.
Note: In this example, “CHAR(10)” is considered a named formula. A named formula is one that has been assigned a name in Excel. Assigning a name (like “NL”) to a formula [like “CHAR(10)”] helps refer to the formula by its name.
So, every time one needs to use “CHAR(10)” in the formulas of the current workbook, one can use “NL” in its place. This is because the “scope” in the “new name” window has been set as “workbook.”
Frequently Asked Questions
Inserting a new line means moving the content of a cell to the next line. This allows one to break lengthy text strings and display their data in multiple lines of a single cell. The shortcuts for inserting a line break in Excel are stated as follows:
Windows operating system – The shortcut is “Alt+Enter.” For this shortcut to work, hold the “Alt” key while pressing the “Enter” key.
Macintosh operating system – The shortcut is “Control+Option+Return” (or “Control+Command+Return”). For this shortcut to work, hold the “Control” and the “Option” keys while pressing the “Return” key.
Note: Before using the preceding shortcuts, ensure that the cursor is placed where a line break needs to be inserted.
The CONCATENATE function joins the values of different cells in a single cell. Thereafter, the “CHAR(10)” inserts line breaks in the single output cell.
The CONCATENATE and CHAR formula for inserting a new line in Excel is stated as follows:
“CONCATENATE(cell1,CHAR(10),cell2,CHAR(10),cell3,CHAR(10)…)”
The steps for inserting a new line with the Find and Replace feature of Excel are listed as follows:
a. Select the cells in which a new line needs to be inserted.
b. Press the keys “Ctrl+H” to open the Replace tab of the Find and Replace window. Alternatively, click the “find & select” drop-down from the “editing” group of the Home tab. Then, select the “replace” option.
c. In the “find what” box, type the separator that separates the strings. For instance, if a comma separates the strings, type a comma. Likewise, if a space separates the strings, type a space.
d. In the “replace with” box, press the keys “Ctrl+J.” A small, blinking dot appears in this box.
e. Click “replace all.”
In the selected cells, all occurrences of the separator (typed in step “c”) will be replaced by line breaks.
Note: Use the Find and Replace feature for inserting line breaks when each selected cell contains at least one occurrence of the separator. At the same time, there is a need to replace all these occurrences with line breaks.
The formula to remove a line break from a cell is stated as follows:
“=SUBSTITUTE(cell1,CHAR(10),””)”
The formula to insert a comma in place of a line break is stated as follows:
“=SUBSTITUTE(cell1,CHAR(10),”,”)”
In both the preceding formulas, “cell1” is the cell that contains the string with line breaks. Further, the SUBSTITUTE function replaces every occurrence of “CHAR(10)” with a blank (“”) or a comma (“,”).
Note: Alternatively, the line breaks can be removed with the Find and Replace feature. Press the keys “Ctrl+J” in the “find what” box. In the “replace with” box, type a separator (like a space or comma) that needs to be inserted in place of a line break. Click “replace all” at the end.
Since removing line breaks with the Find and Replace feature may not always work as desired, one can use the preceding SUBSTITUTE and CHAR formulas.
Recommended Articles
This has been a guide to inserting a new line in a cell of Excel. Here we learn how to start a new line in an Excel cell by using the shortcut keys (Alt+Enter), CHAR function, and named formula [CHAR(10)]. A downloadable template is available on the website. You may learn more about Excel from the following articles–
Источник
A new line in excel cell is inserted when one needs to move a string to the next line of the cell. To insert a new line, a line break must be added at the relevant place. A line break tells Excel to break the existing line and begin a new line (within the same cell) with the immediately following character. When line breaks are inserted in a cell, its content can be seen in multiple lines.
For example, in the following image, a line break has been inserted after the cities Bangalore and Mysore. So, a total of two line breaks have been inserted in cell A1. Notice that the three cities are in three different rows of the same cell.
Starting a new line in an excel cell ensures that the lengthy text strings are split into multiple lines. This improves the readability and lends a neat look to the worksheet. To obtain the right result after inserting line breaks, ensure that the wrap text feature of Excel is turned on.
Table of contents
- Insert a New Line in an Excel Cell
- Top 3 Ways to Insert a New Line in a Cell of Excel
- #1 – Using the Shortcut Keys “Alt+Enter”
- #2–Using the “CHAR(10)” Formula of Excel
- #3–Using the Named Formula [CHAR(10)]
- Frequently Asked Questions
- Recommended Articles
- Top 3 Ways to Insert a New Line in a Cell of Excel
Top 3 Ways to Insert a New Line in a Cell of Excel
The methods to start a new line in a cell of Excel are listed as follows:
- Shortcut keys “Alt+Enter”
- “CHAR(10)” formula of Excel
- Named formula [CHAR(10)]
Let us consider an example of each technique.
Note: The line feed (LF) and carriage returnCarriage Return in excel cell is a way to shift to a new line within the same cell. This could be treated as a line breaker which fits in huge data in an organized manner within one cell.read more (CR) are two terms closely related to a line break. The LF moves the cursor to the next line within the cell. In contrast, a CR moves the cursor to the beginning (or the first position) of the same line. So, with a CR alone, the cursor does not move to the next line.
Every operating system considers a line break (LF or CR or a combination of CR and LF) differently. For instance, when a line break is inserted in the Windows operating system, both CR and LF (called CR+LF or CRLF) are inserted together.
The CRLF moves the cursor to the beginning of the next line. However, the “Alt+Enter” method inserts only line feeds in Excel. The ASCII (American Standard Code for Information Interchange) codes for LF and CR are 10 and 13 respectively.
In this article, the usage of code 10 has been shown in example #2. Further, this article uses the term line break in place of line feed and carriage return. Hence, consider all three (line break, line feed, and carriage return) to be the same in this article.
#1 – Using the Shortcut Keys “Alt+Enter”
The following image shows the names of three cities of India in cell A1. We want to insert a line break after the first two cities of this cell. Use the keys “Alt+Enter” of Excel.
The steps to insert line breaks by using the keys “Alt+Enter” are listed as follows:
Step 1: Double-click inside cell A1. Next, move and bring the cursor immediately before the “M” of Mysore. To do this, either move the cursor with the arrow keys of the keyboard or click at the stated position with the left-click of the mouse.
The cursor is placed before Mysore because a line break needs to be inserted at this position.
Note: Alternatively, one can also place the cursor at the stated position in the formula bar.
Step 2: Press the keys “Alt+Enter.” For this shortcut to work, hold the “Alt” key while pressing the “Enter” key.
A new line is inserted before “Mysore,” as shown in the following image.
Step 3: Place the cursor before the “M” of Mumbai by using the left-click of the mouse. Press the keys “Alt+Enter,” the way they were pressed in the preceding step.
The name “Mumbai” shifts to a new line within the same cell of Excel. This is shown in the following image.
Step 4: Press the “Enter” key to exit the Edit mode. The following image shows the names of the three cities in multiple lines of a single cell (cell A1) of Excel. This result will be displayed only if the wrap text feature of Excel is turned on.
Notice that the formula bar (in the following image) shows a line break after Bangalore.
Note: The “wrap text” is a toggle button in the “alignment” group of the Home tab. It can also be accessed from the “alignment” tab of the “format cells” window. This window can be opened by pressing the shortcut “Ctrl+1.”
By default, the wrap text feature is turned on when a line break is inserted with the “Alt+Enter” method in Excel. To cross-check, keep cell A1 selected and notice that the “wrap text” button is automatically activated after inserting a line break with the shortcut keys.
If the wrap text button is turned off, the content of cell A1 will display in a single line. However, the line breaks will still be visible in the formula bar.
#2–Using the “CHAR(10)” Formula of Excel
The following image shows the names and addresses of some people. The first and the last names have been split into columns A and B respectively. The address has been split into columns C to G. We want to perform the following tasks:
- Join the first and the last name to the full address of each person. For this, combine the strings of columns A and B with those of columns C to G. Use the ampersand (&) to join the stated strings. Ensure that a single space character precedes each string of the address.
- Insert a line break between the last name and the first character of the address. Use the CHAR function for inserting line breaks.
In the end, the complete name should be in one line, followed by the address in the subsequent lines of the cell. Further, use a single formula for performing the given tasks. Explain the formula used.
The steps to perform the given tasks by using the ampersand and the CHAR functionThe character function in Excel, also known as the char function, identifies the character based on the number or integer accepted by the computer language. For example, the number for character «A» is 65, so if we use =char(65), we get A.read more are listed as follows:
Step 1: Insert a new column to the right of the given dataset. We have inserted column H titled “full address.” This is shown in the following image.
Step 2: Begin by combining the first and last names (of row 2) with the ampersand. To do this, type the following formula in cell H2.
“=A2&“ ”&B2&”
This formula joins the first and the last names of cells A2 and B2 and also inserts a space between them. However, the formula is currently incomplete.
Step 3: Extend the preceding formula to include the CHAR function. Open this function by typing “CHAR,” followed by the opening parenthesis.
The opening of the CHAR function is shown in the following image.
Step 4: Insert the number 10 within the CHAR function. The “CHAR(10)” formula inserts a line break in Excel.
Note: The syntax of the CHAR function is “CHAR(number).” This function returns a character when a number between 1 and 255 is entered. The character is returned from the character set of the user’s computer.
Earlier, the Windows operating system used the ASCII and the ANSI character sets, which have now been replaced by Unicode. The ASCII stands for American Standard Code for Information Interchange. The ANSI character set was created by the American National Standard Institute.
In contrast, the Macintosh operating system uses the Macintosh character set. So, the Macintosh users may use the formula “CHAR(13)” to insert a line break in Excel.
Step 5: Insert the cell references to be joined with the strings of cells A2 and B2. So, in cell H2, enter the following formula by excluding the beginning and ending double quotation marks.
“=A2&” “&B2&CHAR(10)&C2&” “&D2&” “&E2&” “&F2&” “&G2”
Press the “Enter” key. The output appears in cell H2. The formula and the output are shown in the following image. The output is not fully visible as it is in a single line of cell H2 of Excel.
Explanation of the formula: The preceding formula joins the first and the last names (in cells A2 and B2) with the entire address of a person (in cells D2, E2, F2, and G2). The ampersand (&) is used to join.
Notice that, in the formula, a space character has been inserted preceding the strings of cells D2, E2, F2, and G2. This space character is inserted within double quotation marks (like “ ”). These spaces of the formula ensure that spaces are inserted as separators in the output. Moreover, the separators are inserted at exactly those places (in the output) where they have been entered in the formula.
However, no space is inserted between the strings of cells B2 and C2. Rather, the “CHAR(10)” has been used in place of a space. This is because the “CHAR(10)” moves the immediately following string (of cell C2) to the next line.
Step 6: Activate the wrap text feature of Excel to see the entire content of cell H2. So, select cell H2 and click the “wrap text” button in the “alignment” group of the Home tab.
The output is shown in the following image. The full name and the complete address are visible in cell H2. Not only the strings of cells A2 to G2 have been joined, but a line break has also been inserted after the name (James Butt). As a result, a legible output has been obtained in cell H2.
Note: When a line break is inserted by the CHAR function, the wrap text feature of Excel is not turned on by default. Rather, this feature needs to be enabled manually to see the impact of the line break.
Step 7: Drag the formula of cell H2 till cell H8 by using the fill handle. The fill handle is displayed at the bottom-right corner of cell H2.
The dragging of the fill handle and the outputs are shown in the following image. Hence, the names and addresses have been consolidated neatly in column H.
#3–Using the Named Formula [CHAR(10)]
Working on the dataset of example #2, we want to perform the following tasks:
- Assign the name “NL” to the “CHAR(10)” formula. By doing this, “CHAR(10)” becomes a named formula.
- Add the comment “new line inserter” to the name “NL.”
- Show how to use the name “NL” (representing the named formula) in the ampersand and CHAR formula of example #2. Explain the formula thus used.
Use the “define name” property of Excel for the first two bullet points.
The steps to perform the given tasks by using the named formula are listed as follows:
Step 1: Click “define name” from the “defined names” group of the Formulas tab. This option is shown in the following image.
Step 2: The “new name” window opens, as shown in the following image. Make the following insertions in this window:
- In the “name” box, enter the name “NL.”
- In the “scope” box, let the option “workbook” remain selected.
- In the “comment” box, enter the string “new line inserter.”
- In the “refers to” box, enter the formula “=CHAR(10).”
Ensure that the insertions of points “a,” “c,” and “d” are entered without the beginning and ending double quotation marks. Click “Ok” once the insertions are done.
Note 1: The name and the comment cannot exceed 255 characters in length. The name must begin with a letter, underscore (_) or backslash (). Further, the name should not consist of any space characters.
Note 2: The “new name” window can also be opened by clicking “name managerThe name manager in Excel is used to create, edit, and delete named ranges. For example, we sometimes use names instead of giving cell references. By using the name manager, we can create a new reference, edit it, or delete it.read more” (in the “defined names” group) from the Formulas tab and then clicking “new” (in the “name manager” window).
Step 3: Use “NL” in place of “CHAR(10)” in the following formula.
“=A2&” “&B2&NL&C2&” “&D2&” “&E2&” “&F2&” “&G2”
Press the “Enter” key. The outputs are shown in the following image.
Note: When the “N” of “NL” is typed in the formula, Excel shows the name (NL) as well as the comment (new line inserter) in a list of suggestions. To select “NL” from this list, just double-click it.
Explanation of the formula: The outputs of the preceding formula are the same as that of example #2 (in step 7). This is because other than the name “NL,” the formulas of the two examples (examples #2 and #3) are the same.
Since “CHAR(10)” has been named “NL,” we have used this name in the formula instead of the CHAR function. The “wrap text” feature has also been applied to cell H2. This is the reason its content has fitted into multiple lines of cell H2 of Excel.
Notice that using a different name for “CHAR(10)” has not impacted the result. Rather, using the name “NL” has made the preceding formula compact and understandable.
Note: In this example, “CHAR(10)” is considered a named formula. A named formula is one that has been assigned a name in Excel. Assigning a name (like “NL”) to a formula [like “CHAR(10)”] helps refer to the formula by its name.
So, every time one needs to use “CHAR(10)” in the formulas of the current workbook, one can use “NL” in its place. This is because the “scope” in the “new name” window has been set as “workbook.”
Frequently Asked Questions
1. What does it mean to insert a new line in a cell of Excel? Suggest the shortcuts for inserting a line break in Windows and Macintosh operating systems.
Inserting a new line means moving the content of a cell to the next line. This allows one to break lengthy text strings and display their data in multiple lines of a single cell. The shortcuts for inserting a line break in Excel are stated as follows:
Windows operating system – The shortcut is “Alt+Enter.” For this shortcut to work, hold the “Alt” key while pressing the “Enter” key.
Macintosh operating system – The shortcut is “Control+Option+Return” (or “Control+Command+Return”). For this shortcut to work, hold the “Control” and the “Option” keys while pressing the “Return” key.
Note: Before using the preceding shortcuts, ensure that the cursor is placed where a line break needs to be inserted.
2. How to use the CONCATENATE function and the Find and Replace feature to insert a new line in Excel?
The CONCATENATE function joins the values of different cells in a single cell. Thereafter, the “CHAR(10)” inserts line breaks in the single output cell.
The CONCATENATE and CHAR formula for inserting a new line in Excel is stated as follows:
“CONCATENATE(cell1,CHAR(10),cell2,CHAR(10),cell3,CHAR(10)…)”
The steps for inserting a new line with the Find and Replace feature of Excel are listed as follows:
a. Select the cells in which a new line needs to be inserted.
b. Press the keys “Ctrl+H” to open the Replace tab of the Find and Replace window. Alternatively, click the “find & select” drop-down from the “editing” group of the Home tab. Then, select the “replace” option.
c. In the “find what” box, type the separator that separates the strings. For instance, if a comma separates the strings, type a comma. Likewise, if a space separates the strings, type a space.
d. In the “replace with” box, press the keys “Ctrl+J.” A small, blinking dot appears in this box.
e. Click “replace all.”
In the selected cells, all occurrences of the separator (typed in step “c”) will be replaced by line breaks.
Note: Use the Find and Replace feature for inserting line breaks when each selected cell contains at least one occurrence of the separator. At the same time, there is a need to replace all these occurrences with line breaks.
3. How to remove a line break from a cell of Excel?
The formula to remove a line break from a cell is stated as follows:
“=SUBSTITUTE(cell1,CHAR(10),””)”
The formula to insert a comma in place of a line break is stated as follows:
“=SUBSTITUTE(cell1,CHAR(10),”,”)”
In both the preceding formulas, “cell1” is the cell that contains the string with line breaks. Further, the SUBSTITUTE function replaces every occurrence of “CHAR(10)” with a blank (“”) or a comma (“,”).
Note: Alternatively, the line breaks can be removed with the Find and Replace feature. Press the keys “Ctrl+J” in the “find what” box. In the “replace with” box, type a separator (like a space or comma) that needs to be inserted in place of a line break. Click “replace all” at the end.
Since removing line breaks with the Find and Replace feature may not always work as desired, one can use the preceding SUBSTITUTE and CHAR formulas.
Recommended Articles
This has been a guide to inserting a new line in a cell of Excel. Here we learn how to start a new line in an Excel cell by using the shortcut keys (Alt+Enter), CHAR function, and named formula [CHAR(10)]. A downloadable template is available on the website. You may learn more about Excel from the following articles–
- Using Insert Function in Excel
- Insert Page Break in Excel
- How to Insert a Line in Excel?
- How to Insert Comment in Excel?
New Line in Excel Cell (Table of Contents)
- Introduction to New Line in Excel Cell
- How to Insert New Line in Excel Cell?
Introduction to New Line in Excel Cell
A new line in a cell is called a line break that is generally used to end the current line and start a new line in the same cell. Let us see a simple example of this as below:
- First, use the keyboard shortcut Alt + Enter.
- Using concatenation/ampersand operator (&) and CHAR (10) function.
- Using the “Find & Replace” function.
How to Insert a New Line in Excel Cell?
Let’s understand how to insert a New Line in Excel Cell with some examples.
You can download this New Line Excel Cell Template here – New Line Excel Cell Template
Example #1 – Using the Keyboard Shortcut Alt + Enter
The simplest way to insert a new line in an Excel cell is by using the keyboard shortcut Alt + Enter. Let us say we wish to enter the text “Happy Birthday” in two lines in the same cell (“Happy in one line and “Birthday” in the other line). So the following process can be used to do so:
- Position the cursor at a point or location in the cell where the new line is to be inserted.
- Now while holding down the Alt key, press the Enter key, and type the remaining text.
While inserting a new line in a cell, “Wrap text” should be enabled so as to see the desired text in a new line. If the cell is not in the “Wrap Text” mode, then all the text would be seen in a single line even if a line break is applied. We have the “Wrap Text” option in the “Home” tab of the ribbon.
So we can see in the above screenshot that when the “Wrap Text” option is enabled (highlighted in red), and so we can see the desired text in a new line. If this were not enabled, then even after inserting the line break, we would not be able to see “Birthday” in a new line.
Example #2 – Using Concatenation/Ampersand Operator (&) and CHAR (10) Function
Now let’s say in the above example, we wish to achieve the same result using concatenation/ampersand operator (&) and CHAR (10) function. Then the following steps can be used to do so:
To insert a line break with the help of a formula that uses concatenation/ampersand operator (&) and CHAR (10) function, the syntax used for the formula is:
=”text” & CHAR (10) & “text” & CHAR (10) & “text”, and so on
where,
- text: These are some portion of texts that have to be concatenated in different lines in the same cell
- CHAR (10) in between these text portions uses an ASCII code to return a line feed in Windows. This would force the formula to insert a new line.
So let us now see how this works:
Once the Char Function is used, the output is shown below.
So we can see in the above screenshot that when “Wrap text” is activated, then using the ampersand operator and CHAR (10) function also, we can achieve the same result of inserting a line break as with the keyboard shortcut. This is because the formula works by combining all the text pieces using the ampersand or concatenation operator with CHAR function between each piece with character code 10. This character code in Windows is used for a line break in Excel.
Example #3 – Using the Concatenation Operator and CHAR Function
Now we will use the Concatenation operator and CHAR function when “Wrap Text” is enabled. Let us say we wish to have each line of an address in a new line of the same cell. So the following steps can be used to do so using concatenation/ampersand operator (&) and CHAR (10) function:
Once CHAR and ampersand function is used, the output is shown below.
So we can see in the above screenshot that each section of the address is in the new line of the same Excel cell. This has also been achieved using the concatenation operator and CHAR (10) function when “Wrap Text” was enabled.
Example #4 – Using the Find & Replace Function
Now let us say we have an address of some people as follows:
Now, if we wish to insert a new line where there is a comma in the address. This is which we wish to insert in a cell with each line of an address in each new line of the same cell. So this can be done using the FIND and REPLACE function. The following steps can be used to do so.
- Select all those cells in which we wish to replace the comma with a new line.
- Now click on the ‘Home’ tab and click on ‘Find & Select’ -> ‘Replace’ (or press Ctrl + H). This will open the ‘Find & Replace’ dialog box.
- Now in the dialog box that appears, enter ‘,’ in the ‘Find What’ field. Then place the cursor in the ‘Replace’ field and press ‘Ctrl + J’ so as to insert a new line. After pressing Ctrl +J, we will see a blinking dot in the Replace field. Then click on ‘Replace All’.
- This will make the following changes in the above addresses.
So we can see in the above screenshot that wherever there was a comma in the address, a new line is inserted in place of it. These changes will again be seen only if “Wrap Text” is enabled or activated. If not, then changes would not be seen.
Things to Remember About New Line in Excel Cell
- A new line is to be inserted in a cell when we wish to add spacing between lines or paragraphs.
- The keyboard shortcut technique can be used to make complicated formulas easy to read.
- While inserting a new line in a cell, “Wrap text” should be enabled or activated so as to see the desired text in a new line.
- While using the CHAR (10) function and concatenation operator method to insert a line break or new line, creating a named range (using the ‘Define Name’ option) can also be used instead of CHAR (10) function.
Recommended Articles
This is a guide to New Line in Excel Cell. Here we discuss how to Insert New Line in Excel Cell along with practical examples and a downloadable excel template. You can also go through our other suggested articles –
- Line Break in Excel
- Cell Reference in Excel
- Divide Cell in Excel
- SUM Cells in Excel
To start a new line of text or add spacing between lines or paragraphs of text in a worksheet cell, press Alt+Enter to insert a line break. Double-click the cell in which you want to insert a line break (or select the cell and then press F2). Click the location inside the selected cell where you want to break the line.
Contents
- 1 How do you add a line in Excel quickly?
- 2 How do I add a line between rows in Excel?
- 3 What is the formula to add lines in Excel?
- 4 How do I draw a line in an Excel cell?
- 5 How do you total rows in Excel?
- 6 How do you insert a paragraph in an Excel cell?
- 7 How do I draw a line through text in Excel?
- 8 How do you add a total row?
- 9 How do I insert a row in an Excel table?
- 10 How do I find a row in Excel?
- 11 How do I enter multiple lines in an Excel cell?
- 12 How do you make an XY line in Excel?
- 13 How do you add a horizontal line in a chart in Excel?
- 14 How do you put a line through text?
- 15 What is row in Excel?
How do you add a line in Excel quickly?
To quickly insert a row in Excel, select a row and use the shortcut CTRL SHIFT +.
How do I add a line between rows in Excel?
Add empty rows between multiple data lines in Excel
- Keep the Ctrl key pressed and manually select each row with data by clicking on the row number.
- Press the Insert button on the Ribbon or use any Excel shortcut I listed above to see the results.
What is the formula to add lines in Excel?
How to start a new line in Excel cell
- Windows shortcut for line break: Alt + Enter.
- Mac shortcut for line feed: Control + Option + Return or Control + Command + Return.
How do I draw a line in an Excel cell?
To Draw a line in excel, follow these steps:
- In the Insert tab under illustrations, click on shapes.
- When the dialog box appears to go to the line section,
- Select any type of line from the various given options to draw a connection.
How do you total rows in Excel?
Click anywhere inside the table. Go to Table > Total Row. The Total Row is inserted at the bottom of your table. Note: If you apply formulas to a total row, then toggle the total row off and on, Excel will remember your formulas.
How do you insert a paragraph in an Excel cell?
Add paragraph in Excel
- Click any cell inside the column and start typing.
- When you are at the end of the sentence, press Left Alt + Enter.
- Add paragraph in Excel from Word.
- In order to copy a paragraph into the same cell, you have to double-click the cell to be in the editing mode.
How do I draw a line through text in Excel?
While your mouse is over the selected text, right-click and then select “Format Cells” from the popup menu. When the Format Cells window appears, select the Font tab. Check the Strikethrough checkbox. Click on the OK button.
How do you add a total row?
Try it!
- Select a cell in a table.
- Select Design > Total Row.
- The Total row is added to the bottom of the table.
- From the total row drop-down, you can select a function, like Average, Count, Count Numbers, Max, Min, Sum, StdDev, Var, and more.
How do I insert a row in an Excel table?
Use Insert to add a row
- To insert a row, pick a cell or row that’s not the header row, and right-click. To insert a column, pick any cell in the table and right-click.
- Point to Insert, and pick Table Rows Above to insert a new row, or Table Columns to the Left to insert a new column.
How do I find a row in Excel?
Getting a row number is easy—just find the cell you’re interested in, click on it, and look at the highlighted row number on the side of the window. Sometimes, however, you need to use that information in a function. That’s where ROW comes in. This function can be run with no arguments.
How do I enter multiple lines in an Excel cell?
5 steps to better looking data
- Click on the cell where you need to enter multiple lines of text.
- Type the first line.
- Press Alt + Enter to add another line to the cell. Tip.
- Type the next line of text you would like in the cell.
- Press Enter to finish up.
How do you make an XY line in Excel?
Creating an xy scattergraph in Microsoft Excel
- Select the data and click on the chart wizard button:
- Choose an x-y scatter graph:
- Choose finish:
- Click on a point on the chart to highlight the data points:
- Choose Chart: Add Trendline.
- Choose a linear regression and then click on the Options tab.
How do you add a horizontal line in a chart in Excel?
2.5 Chart formatting
- Delete all axis values.
- Select the chart.
- Go to tab “Design” on the ribbon.
- Press with left mouse button on “Add Chart Element” button.
- Press with left mouse button on “Axis”.
- Press with left mouse button on “Secondary Horizontal “.
- Repeat steps 4-5, then add a “Vertical Horizontal” axis.
How do you put a line through text?
How to Strikethrough Text in Word
- Highlight the text that you want to strikethrough in Word.
- Click the button that has a strikethrough “ab” or press Alt + H + 4 at the same time.
- See your strikethrough text.
What is row in Excel?
In Microsoft Excel, a row runs horizontally in the grid layout of a worksheet. Horizontal rows are numbered with numeric values such as 1, 2, 3.Each row in the worksheet has its own row number which is used as part of a cell reference such as A1, A2, or M16.