How do i create a formula and text in the same cell in google sheets?

Google Sheets is a great tool when you want to work with numbers, but a lot of people use it to maintain records and keep track of stuff.

And when you work with text data in Google Sheets, you will sometimes have a need to have multiple lines in the same cell.

In this tutorial, I will show you a few ways you can use to insert a new line in the same cell in Google Sheets. This can be done manually (if you’re typing and need to add a new line), or you can use a formula as well.

So let’s get started!

  • Manually add a new line in the same cell (Keyboard Shortcut)
  • Replace a Character with Line Break in Google Sheets

Manually add a new line in the same cell (Keyboard Shortcut)

If you’re manually entering data in Google Sheets, you can use the below keyboard shortcut to add a new line in the same cell.

ALT + ENTER (hold the alt key and then press the Enter key)

Below are the steps to use this in a cell to go to a new line:

  1. Double-click on the cell in which you want to add a line break (or select it and then press F2).
  2. Place the cursor where you want to insert the line break
  3. Hold the ALT key and then press the Enter key (or Control + Option + Enter if you’re using a Mac)

The above steps would add a new line and you will see the cursor in the next line.

Replace a Character with Line Break in Google Sheets

Using the keyboard shortcut to get to a new line is fine if you’re manually entering the data. But with large datasets, you can also use the help of a simple formula.

Suppose you have a dataset as shown below where there are addresses that have a comma separating parts of it. If you want to remove this comma and replace this with a line break (so that each part of it is in a new line), you can do that using a formula.

How do i create a formula and text in the same cell in google sheets?

Below is the formula that will place each part in the new line in the same cell:

 =SUBSTITUTE(A2,", ",CHAR(10))

How do i create a formula and text in the same cell in google sheets?

The above formula looks for the comma in the text in the cell and replaces it with CHAR(10), which is the ASCII code for a line break.

For this formula to give you the expected result (where each part of the address is in a new line in the same cell), you need to make sure that the wrap text for these cells is enabled (the cells where you have used the formula).

To enable Wrap text, click the Formatting option in the menu and click on Text wrapping –> Wrap.

So there are two quick ways to add a new line in the same cell in Google Sheets. If you only have a few cells where you need to do this, you can use the Control + Enter method, else you can try the formula method.

Hope you found this tutorial useful!

Other Google Sheets tutorials you may like:

  •  How to Autofit Column Width in Google Sheets
  • How to Hide Gridlines in Google Sheets
  • How to Keep Leading Zeros in Google Sheets
  • Add Subscript and Superscript in Google Sheets
  • How to Combine Cells in Google Sheets

How do you add text and formulas in the same cell?

Combine Cells With Text and a Number.
Select the cell in which you want the combined data..
Type the formula, with text inside double quotes. For example: ="Due in " & A3 & " days" NOTE: To separate the text strings from the numbers, end or begin the text string with a space..
Press Enter to complete the formula..

How do I put text before formula in sheets?

Formula-free way to add text in Google Sheets.
Select the cells to handle..
Enter the text you want to add..
Choose one of 5 positions where you'd like to insert your string..
Click Run..

How do I combine text and formulas in Excel?

Type = and select the first cell you want to combine. Type & and use quotation marks with a space enclosed. Select the next cell you want to combine and press enter. An example formula might be =A2&" "&B2.

How do I use text formulas in Google Sheets?

How Do I Use the TEXT Formula in Google Sheets? The TEXT formula is =TEXT(num, format), where num represents the number or the cell address containing the number which needs to be converted into text. The format represents the method by which you want to display the data.

How do I add text to a formula result?

4 Ways to Add Text before a Formula in Excel.
Add Text in a Formula Using Ampersand (&) In Excel, we can easily add text using ampersand before, after, and between a formula. ... .
Add Text before a Formula Using CONCAT Function. ... .
Add Text before a Formula Using TEXTJOIN function. ... .
Add Text before a Formula Using VBA..

How can I include two formulas in a single cell in Google Sheets?

To combine two formulas in one cell, use the concatenate function or the binary concatenate operator.