How to Insert a Text Box in Google Sheets

This post is going to show you how to insert and edit a text box in Google Sheets.

Text boxes can be used to draw attention to specific areas or to add visual interest. Even though Google Sheets already has cells for adding numbers or text, you may also need to insert a text box in Google Sheets at times.

It allows you to create a large text area without having to change the row height or column widths. Text boxes can take any shape, unlike formatted cells.

A text box can be used to direct attention, or as a banner to add a stylish caption to your sheet.

Text boxes have more formatting options available than inside a cell and can help make your Google Sheets appear more formal and professional, especially when you create a report or dashboard.

There is currently no obvious way to insert a text box in Google Sheets but it can be added using the drawing command.

Text boxes allow you to insert text or images and then move them anywhere over the Sheet.

In this article, you will learn how to insert, format, edit, and assign an app script a text box.

Get your copy of the example workbook used in this post and follow along!

How to Insert a Text Box

Follow the below steps to insert a text box in Google Sheets

  1. Select the Insert menu.
  2. Choose the Drawing option.

This will open the drawing dialog box.

  1. Click the Text box Icon in the drawing dialog box.
  1. Click and hold the mouse key, then drag it to the desired size of your text box.
  2. Type your text to replace Your text here… in the text box.
  3. Click on Save and Close button.

The text box you inserted using the above steps in Google Sheets is an object that floats above the grid. You can click, drag and drop it anywhere on the sheet.

What you change in the cells has no effect on the text box. The text box will remain unchanged if you delete or insert rows and columns beneath the text box.

How to Edit a Text Box

Follow these steps if you want to open the Drawing dialog box to format or edit the text box.

  1. Click the text box.
  2. Click the three vertical dots in the top right corner of your text box.
  3. Click Edit in the list of options.

This will open the Drawing dialog box to edit your text box. You’ll be able to edit the text, font, font size, font color, background color, and many other formatting options.

Change the text in your text box.

  1. Make any required changes to your text.
  2. Press the Save and Close button.

To change the background color of your text box and the font size of the text in the Drawing dialog box

  1. Select the Text Box in the drawing dialog box
  2. Click Fill Color icon.
  3. Select any color.
  1. Click the text in your text box.
  2. Increase or decrease the Font size.
  3. Press the Save and Close button.

Sometimes you may need to add extra space around the text in the text box.

Follow the below steps to adjust the height and width of the text box in the drawing dialog box. The default text box will resize to fit the text, but you can change this option.

  1. Select the Text inside your text box.
  2. Click the Icon left side of your text box.
  3. Choose the Do not auto-fit option.
  1. Resize your text box by dragging the bottom right blue square point
  2. Press the Save and Close button.

There are a lot of options available in the drawing dialog box to format the shapes in google sheets. 

How to Assign an App Script to a Text Box

In Google Sheets, you can assign a Google Apps Script to your text box and the script will execute when you click the text box. This means you can use a text box as a button.

Follow the below steps to assign an app script to your text box.

  1. Select the Extensions menu.
  2. Click the Apps Script option from the menu.

The above steps open the app script code editor window and you can add the code you want to execute from your button.

function toggleGridlines() {
  var mySheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var gridStatus = mySheet.hasHiddenGridlines();
  mySheet.setHiddenGridlines(!gridStatus);
};

Copy and paste the script into your Google Sheet code editor and press the Save button. The script works as a toggle button to show or hide the gridlines in google sheets.

  1. Click the text box.
  2. Click the three vertical dots in the top right corner of your text box.
  3. Click Assign Script from the list of options.

This will open the Assign script dialog box to assign the script to the text box.

  1. Enter the name of your script toggleGridlines in the Assign Script dialog box.
  2. Press the OK button.

Now when you click the text box it will execute your script!

Conclusions

Adding a text box to your Google Sheets is not obvious and can be confusing because you first need to create a design using drawing commands before adding the text box.

Even though it’s not a simple drag and drop to your sheet, once you know how to do it, it’s still really simple.

Once your text box has been created, it is flexible and the style can be easily changed. It will reside on top of the cells and will not be impacted by any change to the grid.

Inserting the text box in Google Sheets helps to add titles, callouts, or buttons to execute app scripts. This will give your sheets a professional look.

Do you know any other methods to add text boxes in Google Sheets? Let me know in the comments below!

About the Author

Arnold Layne

Arnold Layne

Arnold is a Google Workspace certified consultant and Google Sheets expert. He has over 15 years of experience in the IT industry and specializes in helping businesses implement and use Google products to increase efficiency and productivity. He is an avid traveler, and loves exploring new cultures and learning about different ways of life.

Related Articles

Comments

0 Comments

Get the Latest Google Sheets Tips

Write For Us

Are you a tech enthusiast with a talent for writing great content? Come write for us!

Follow Us

Follow us on social media to stay up to date with the latest in Google Sheets!