Not every platform supports pressing enter for a new line. It gets slightly complicated and borderline annoying when pressing the enter key results in the cursor moving to the below cell.
The Enter key is somewhat involved in going to a new line in Google Sheets, but you need another key along with it. For Windows, you need to press Ctrl + Enter, and for Mac, you need to press Cmd + Enter to break the line.
But the keyboard shortcut is not the only way to do that. What if you want two lines in the same cell to reflect two different results based on two different formulas? Thankfully, breaking the line also allows you to write two different formulas in the same cell.
More into it later in this article. Now, without further delay, let’s get in!
Adding New Lines in Google Sheets
There are two predominant ways to start lines inside a cell. One is through the keyboard shortcut, and the other is through a function that you can write inside the cell as a formula. While both produce the same results, the purpose for both are slightly different.
There is another way to automate the process based on the width and height of the cell. More on that later, but let us take a look at the first two methods.
Method 1: With Keyboard Shortcuts
Both the Control or Command key and Alt or Option key work the same when pressed along with the Enter key to enter a line.
You would ask why two shortcuts are performing the same task, but your guess is as good as ours with that.
- Go to the cell where you want to enter texts in two different lines or where you want to start a new line.
- Enter the cell by pressing the F2 key or by double-clicking on the cell.
- Write down the text you want to display in the first line.
- To break the line, press Ctrl + Enter or Alt + Enter at the same time. That would be Cmd + Enter & Opt + Enter for macOS.
- Now write down the text you want to display in the second line.
- Press enter to finish.
Note that if you have not expanded the height or width of the cell, then you may only see the text from the first line. You should be able to see both lines upon entering the cell with a double click or by pressing F2.
Method 2: Using Function
There are dedicated functions that perform the same tasks that keyboard shortcuts or menu functions do.
The “Char” function is one such effective one. The function you have to use is “Char(10)” but with a particular syntax.
If you have two sentences, let’s assume “Hello” and “How are you?”, for two different lines, then you have to write it like a formula starting with the “=” sign. Separate the two sentences with the “&Char(10)&” function.
Here is how to use the “Char(10)” function with the above example:
=”Hello”&char(10)&”How are you?”
This will display the text “Hello” in the first line and “How are you?” in the second line. The function with an ampersand sign acts as the line breaker.
Breaking the Line with Wrap Text
Wrap text automatically breaks the line and makes sure that no text from that particular cell goes beyond the width of the cell.
If you increase the width of the cell, the line breaks at a later point. If you match the width of the cell to that of the text, then it doesn’t add a new line at all.
This is very useful when you don’t wish to manually insert a line and want the text within a cell to adjust to the width automatically.
Here is how you can let the wrap text feature to break the line automatically.
- Go to the cell where you want to enter texts in two different lines or where you want to break the line.
- Click on it or press F2 to enter the cell.
- Locate the Text wrapping option on the ribbon menu. It will be shaped like the letter “H”.
- Click on the dropdown and select the second option, which is “wrap”.
- Alternatively, you can also go to Format from the main menu after clicking the cell select “Wrapping” from the dropdown, and then select “Wrap” from the sub-dropdown.
This will adjust the height of the cell and break the line based on the cell’s width.
Note: Breaking the line will also break a formula be it not equal or transpose. So you must write the whole formula without worrying about the alignment inside the cell. On the plus side, if you write two completely separate formulas in two different lines inside a cell, then both will work independently.
You can also use popular text formatting functions like SUBSTITUTE to replace text and TEXTJOIN to join different texts along with making the line.
Wrap Up!
Once you get the hang of it then going to the next line is quite straightforward with the keyboard shortcuts. The only concern is the width of the cell. This is why wrapping text makes more sense.
Moreover, you can wrap a text that is longer than the cell’s width and still break a line within the same cell.
Leave a Reply