35

When accessing a spreadsheet in Google Drive on a computer with a keyboard, I can enter a new line in a single cell by pressing alt+enter.

My keyboard on my Android doesn't even have an alt key.

How do I enter a new line on my Android device?

For a keyboard on my Android, I'm currently using Swype, but I am assuming, and hoping, there is some kind of general approach that is not specific to a particular keyboard.

4
  • 2
    I'm afraid there is no "general approach" for that. You might want to take a look into my list on Keyboards & Input Methods, which holds several candidates like Hackers Keyboard which support such "additional keys".
    – Izzy
    Commented Sep 12, 2014 at 9:53
  • Idea #1 to try: create a "reference document" with a single cell where you put in the "new line" character in the cell on a PC and then use copy and paste on your Android device. Idea #2: does Google sheets support macros?
    – Gdalya
    Commented Sep 18, 2014 at 17:35
  • PERFECT ANSWER, RIGHT HERE GUYS: webapps.stackexchange.com/questions/25359/…
    – user110230
    Commented May 27, 2015 at 1:05
  • @user110230, that answer only applies to desktop computers, not to Android phones.
    – Questioner
    Commented May 27, 2015 at 6:24

8 Answers 8

33

Easiest way: add an extra letter at the end of the line. Select that letter. Hit enter. The letter will be replaced with a new line.

4
  • 4
    This is the only right answer Commented May 4, 2017 at 21:08
  • 1
    It has some important caveats: 1) It doesn't work with physical (bluetooth) keyboards, at leasst for me 2) it really needs to be a letter. If you select a space, it doesn't work.
    – Cheetah
    Commented Feb 9, 2018 at 2:14
  • It works with Google Pinyin, but does not work with Google Japanese keyboard
    – fefe
    Commented Jun 23, 2019 at 6:51
  • 4
    It doesn't work in the Google Spreadsheet app (didn't try on the webapp) Commented Sep 22, 2019 at 21:31
5

The function CHAR(10) will return a Line Feed.

Combining with functions like CONCATENATE() or & will give a new line. Example:

=CONCATENATE("First line"; CHAR(10); "Second line")
="First line"&CHAR(10)&"Second line"
0
4

The only way that I found so far is through the clipboard.

Using a source document with a line break, with some effort you could succeed in selecting just the line break, and then copy/paste it.

Even easier is to use an app such as "Unicode Pad" or "Unicode CharMap", both of which will find and then copy/paste any character. You'll need to look for LF, LINE FEED or U+000A.
Note that you won't "see" the character after you select it, it shows as a space for obvious reasons.
This still isn't as convenient as I would like it to be, but at least I found it to work reliably.

3

Mark the cell in which you want to have new lines.

At the top menu click the "A" next to the redo button.

Select submenu

in the lower screen section a modal pops up. There hit the tab "CELL".

Than activate "Wrap Text".

Cell + Wrap Text

Now this cell will do line-breaks on long text.

2
  • 1
    Wrapping is not the same as an inserted line break.
    – wbogacz
    Commented Mar 14, 2017 at 12:23
  • wbogacz is correct that this isn't a line break, but this is exactly what I was looking for.
    – Tom Wyllie
    Commented Apr 30, 2018 at 14:11
3

The highlight a throw-away character and hit enter trick, as well as the type everything into a text editor, then copy/paste it into the Google Sheets cell, both only work on Android devices. I have a Google Spreadsheet that I'm sharing with a client who has an iPhone, and she needs to be able to enter multiple lines within a cell. So I came up with just a little Google Apps Script code to do it on her iPhone (can be entered into the drop-down menu of the Google Spreadsheet, Tools >> Script editor):

function onEdit(e) {
    e.range.setValue(e.value.replace(/\\\\/g, '\\').replace(/ *\\n */g, '\n').replace(/\/g, '\\'));
}

Basically, that creates a function (that is automatically linked to a Google Sheets trigger), and will run every time a cell is edited. It simply replaces all of the "\n" characters in your text with a line-break. Make sure that's a backslash, and not a normal slash. For programmers, the "\n" is a special character that represents a carriage return within a string. The only possible exception where an accidental line-break might happen would be when trying to input a Windows path into a cell such as "C:\Users\John\Documents\news". So double-backslashes is the common workaround for Windows paths among programmers. So one could enter "C:\Users\John\Documents\news" or even just simply "C:\Users\John\Documents\news" (since \n is really the only string we're replacing at this point).

It's also possible to change the replacement characters, in case anyone is more familiar with HTML:

function onEdit(e) {
    e.range.setValue(e.value.replace(/ *<br *\/*> */ig, '\n'));
}

Since "<br>" is much more deliberate (people don't accidentally type that in unless they want a line-break), it makes for a simpler replace function, since we don't have to do an escape for double-backslashes. But personally, typing in the angled brackets from an Android touchscreen keyboard are a bit inconvenient to do so twice for every line-break...

-Ted

1
  • Nice, I think this is by far the most convenient way! I used myself just " lb " (as in line break) to be the value to be replaced with the newline so I can just write "line 1 lb line 2" and don't even need to go to special characters :)
    – Hemaolle
    Commented Aug 14, 2020 at 8:44
1

The following trick worked for me: Ctrl + Enter

2
  • 6
    Mind to explain where Android devices have the Ctrl key? Note this site is about Android, not Desktop.
    – Izzy
    Commented Oct 4, 2018 at 13:14
  • I assume (but haven't tested) that this might work on 3rd-party keyboard apps that have Ctrl key like Hacker's Keyboard.
    – Andrew T.
    Commented Oct 8, 2019 at 7:09
0

I have succeeded by pressing several times Enter when typing a message, select all, copy it and paste it into a cell in a sheet.

-2

Just select a line and press + (top right on the tool bar), you'll be offered to insert a row above or below or a link.

1
  • 1
    Note that the OP wants to insert a new line inside a cell, or probably should be called as line break instead... but not a new row.
    – Andrew T.
    Commented May 14, 2015 at 6:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .