This wikiHow teaches you how to indent cells in Google Sheets. You can use the Custom Format option to add spaces to cells in Google Sheets. You can also add a script that allows you to indent text.

Method 1
Method 1 of 2:

Using Custom Format

  1. Open https://sheets.google.com in a web browser. This is the web page for Google Sheets.
    • If you are not automatically signed in to your Google account, click your Google Email address, or click Use another account and enter the email address and password associated with your Google account.
  2. Clicking a spreadsheet’s name will open it in Google Sheets.
    Advertisement
  3. Click to select a single cell. Use one of the following steps to select multiple cells:
    • Hold Ctrl (PC) or Command (Mac) and click the cells you want to select.
    • Click and drag over the cells you want to select.
    • Hold Shift and click the first cell and the last cell you want to select.
  4. It's in the menu bar at the top of the page. This displays the Format menu.
  5. It's near the top of the "Format" menu. This displays a submenu to the side.
  6. It's at the bottom of the "Number" submenu. This displays another submenu to the side.
  7. It's at the bottom of the "More Formats" submenu. This displays the Custom Number Format window.
  8. This goes in the bar at the top of the Custom Number Format window. There may already be an "@" symbol in this bar. If so, add five spaces in front of it.
    • You can as many spaces as you want your indented text to have.
  9. This applies the spaces to all of the selected cells in your spreadsheet. [1]
    Advertisement
Method 2
Method 2 of 2:

Using a Script

  1. Open https://sheets.google.com in a web browser. This is the web page for Google Sheets.
    • If you are not automatically signed in to your Google account, click your Google Email address, or click Use another account and enter the email address and password associated with your Google account.
  2. Clicking a spreadsheet’s name will open it in Google Sheets.
  3. The script editor allows you to add scripts to your Google Sheets. Use the following steps to create a new script in the script editor:
    • Click Tools in the menu bar at the top.
    • Click Script editor in the Tools menu. This opens the script editor. There’s a little bit of code in there already—you’ll be adding some more code beneath it.
    • Click Untitled Project at the top of the page.
    • Type Indent Text and click OK to rename the project.
  4. Navigate to https://gist.github.com/lstude/48b77d77a8a49c142e94 in a new tab. Right-click the link and click Open link in new tab to open the link in a new tab. Be sure to keep the script editor open in a separate window.
  5. The Raw button is to the right of the script title. This displays the entire text in an editable window.
  6. Use the following steps to copy the entire script.
    • Click and drag over the entire script to select it.
    • Right-click the highlighted script.
    • Click Copy .
  7. Use the following steps to paste the copied script into the script editor:
    • Click the browser tab that contains the "Indent Text" script editor project.
    • RIght-click Line 4 after the "Function" code.
    • Click Paste .
  8. Use the following steps to save the project:
    • Click the File menu.
    • Click Save .
  9. You should see a new menu called "Indent Text" at the top of the newly refreshed spreadsheet. Use the following steps to refresh the browser with your spreadsheet:
    • Click the browser tab that contains your spreadsheet.
  10. Click to highlight an individual cell, or click and drag to highlight multiple cells.
  11. Two options will appear.
  12. The first you use the Indent Text menu, a pop-up will appear asking you to authorize the script. Use the following steps to authorize the script.
    • Click Continue .
    • Select your Google account.
    • Click Advanced at the bottom-left corner of the screen.
    • Click Go to Indent (unsafe) at the bottom of the screen.
    • Click Allow
  13. The two indent options will appear once more.
    • If you want to outdent (move the text to the left), choose <<< instead. Your text is now indented.
    Advertisement

Community Q&A

Search
Add New Question
  • Question
    I followed all the steps through the last one where I refresh a browser to see the Indent Text menu item. I don't see it as an item on my menu bar. What could be the cause?
    Community Answer
    I had to close the file and reopen it. Refreshing in Step 19 didn't work for me. I use Firefox on a Mac.
  • Question
    Does anyone know of similar code that allows you to indent individual lines within a cell and allows you to make running the scripts a hotkey?
    Moniba Hussain
    Community Answer
    To do it, simply click the cell where you want to add indentation. Then, press the space bar for some time depending on how many empty spaces you want to add to the indent. Write the first text and press Enter.
  • Question
    It doesn't work if you have two lines of text via "wrap text" function! It dents only the first line.
    Fyrelord
    Community Answer
    Click the cell you want to add information to and press the space bar for however long you want your indent to be.
Ask a Question

      Advertisement

      About this article

      Article Summary X

      1. Open a spreadsheet in Google Sheets.
      2. Select the cells you want to indent.
      3. Click Format .
      4. Hover over Numbers .
      5. Hover over Custom number formats .
      6. Add 5 spaces followed by an "@" symbol in the bar at the top.
      7. Click Apply .

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 656 times.

      Is this article up to date?

      Advertisement