23

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.

  • 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 Sep 12 '14 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 Sep 18 '14 at 17:35
  • PERFECT ANSWER, RIGHT HERE GUYS: webapps.stackexchange.com/questions/25359/… – user110230 May 27 '15 at 1:05
  • @user110230, that answer only applies to desktop computers, not to Android phones. – Questioner May 27 '15 at 6:24
22

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.

| improve this answer | |
  • 3
    This is the only right answer – Carles Sala May 4 '17 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 Feb 9 '18 at 2:14
  • It works with Google Pinyin, but does not work with Google Japanese keyboard – fefe Jun 23 '19 at 6:51
  • 1
    It doesn't work in the Google Spreadsheet app (didn't try on the webapp) – Thomas LAURENT Sep 22 '19 at 21:31
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.

| improve this answer | |
4

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"
| improve this answer | |
2

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.

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

The following trick worked for me: Ctrl + Enter

| improve this answer | |
  • 6
    Mind to explain where Android devices have the Ctrl key? Note this site is about Android, not Desktop. – Izzy Oct 4 '18 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. Oct 8 '19 at 7:09
1

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

| improve this answer | |
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.

| improve this answer | |
-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.

| improve this answer | |
  • 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. May 14 '15 at 6:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.