ThisCalculator

Everyday

Google Sheets Row Height: Set Custom Size or Fit to Data?

Updated · Standard formula, shown below

Google Sheets Row Height: Set Custom Size or Fit to Data?

To directly answer the question: you can set a custom row height in Google Sheets, and you can also automatically fit rows to their data. The method you choose depends on whether you need a fixed, consistent size or want rows to expand and shrink based on their content. This article explains both options, how to use them, and when each is the better choice.

Background: How Row Heights Work in Google Sheets

Google Sheets, like most spreadsheet applications, gives each row a default height. For most users, this default is 21 pixels (about 0.25 inches or 0.6 cm). However, the actual height you see can vary based on the font size, zoom level, and whether the row contains wrapped text or larger content.

When you type text that is longer than the column width, it either spills over into the next column (if that cell is empty) or gets visually clipped. If you enable text wrapping, the row height automatically increases to show all the text. This is the “fit to data” behavior. But you can also manually set a row to a specific pixel height, which overrides the automatic sizing until you change it back.

Understanding the difference between these two modes is key to controlling how your spreadsheet looks and prints.

How to Set a Custom Row Height

Setting a custom row height is a straightforward process. Here are the steps for both desktop and mobile versions.

On Desktop (Web Browser)

  1. Open your Google Sheets document.
  2. Click on the row number on the left side of the screen to select the entire row. To select multiple rows, click and drag over the row numbers, or hold Ctrl (Windows) or Cmd (Mac) while clicking.
  3. Right-click on the selected row number.
  4. From the context menu, choose Resize row.
  5. In the dialog box that appears, select the Custom height radio button.
  6. Enter the desired height in pixels (e.g., 50, 100, 200).
  7. Click OK.

Alternatively, you can click and drag the bottom border of a row number. The cursor will change to a vertical resize arrow, and a tooltip will show the current height in pixels as you drag.

On Mobile (Android and iOS)

  1. Open the Google Sheets app.
  2. Tap on the row number to select the row. You can drag the selection handles to select multiple rows.
  3. Tap the Format icon (the letter “A” with horizontal lines) at the top of the screen.
  4. Scroll down and tap Resize row.
  5. Enter the custom height in pixels and tap OK.

How to Fit Rows to Data (Auto-Resize)

Fitting rows to data means letting Google Sheets automatically adjust the row height to display all the content in the cells. This is especially useful when you have wrapped text or cells with varying amounts of content.

Method 1: Double-Click the Row Border

  1. Hover your mouse over the bottom border of the row number (the line between the row number and the one below it).
  2. When the cursor changes to a vertical resize arrow (up and down arrows), double-click.
  3. The row will instantly resize to fit the tallest content in that row.

This works for a single row. To fit multiple rows at once, select them first, then double-click the bottom border of any selected row.

Method 2: Use the Resize Row Dialog

  1. Select the row(s) you want to adjust.
  2. Right-click and choose Resize row.
  3. In the dialog, select the Fit to data radio button.
  4. Click OK.

Choosing Between Custom and Fit to Data

Which option should you use? It depends on your goal.

  • Use “Fit to data” when:
    • You have text wrapping enabled and want to ensure all text is visible.
    • You have varying amounts of content in different rows and want each row to be as compact as possible.
    • You are frequently editing content and want the rows to adjust automatically.
  • Use “Custom height” when:
    • You want a uniform look, such as for a calendar or a schedule where each row should be the same size.
    • You need rows to be a specific size for printing or for fitting a certain number of rows on a page.
    • You want to add visual whitespace to make the sheet easier to read.
    • You have images or charts that need a fixed space.

In practice, many users start with “fit to data” and then manually adjust specific rows that need more or less space.

Common Problems and Their Fixes

Here are a few common issues users encounter with row heights.

  • Row won’t fit to data: If double-clicking doesn’t work, check if the row has a manually set custom height. You may need to go to Resize row and select Fit to data explicitly. Also, ensure that text wrapping is enabled for the cells (Format > Text wrapping > Wrap).
  • Row height resets after editing: If you set a custom height and then edit a cell, the row may not auto-resize. This is normal; custom heights are sticky. To revert to auto, use “Fit to data”.
  • Rows are too tall after fitting: This often happens when a cell contains a long string of text without spaces (like a URL). The text wraps, but each “word” is very long, forcing the row to be tall. Consider using a smaller font or breaking the text into shorter segments.
  • Printing issues: Rows that are too tall can cause pages to break awkwardly. Use “Custom height” to control the print layout, or adjust the print scaling options (File > Print > Scale).

Row Height vs. Column Width

It’s easy to confuse row height and column width, but they work independently. Row height controls the vertical space of a row, while column width controls the horizontal space. When you “fit to data” on a row, it only affects the height, not the width. To fit a column to its content, you would double-click the right border of the column header. Both are essential for creating a well-formatted spreadsheet.

Keep in mind that row height is measured in pixels, while column width is measured in pixels as well, but the default width is typically 100 pixels. You can also set column width to a specific pixel value using a similar resize dialog.

Frequently Asked Questions

Can I set a default row height for the entire spreadsheet?

Yes. Select all rows by clicking the rectangle in the top-left corner (between the A column and the 1 row), then right-click any row number and choose Resize row. Set a custom height, and it will apply to all rows. However, this only affects rows that haven’t had their height manually changed.

Why does my row height change when I apply text wrapping?

Text wrapping is the primary trigger for auto-resizing. When you wrap text, Google Sheets automatically increases the row height to show all the lines of text. If you later remove the wrap, the row height may stay the same unless you use “Fit to data” again.

Is there a maximum row height in Google Sheets?

Yes, the maximum row height is 4096 pixels. If you try to set a larger value, it will be capped at 4096. This is more than enough for most use cases.

How do I make all rows the same height?

Select all rows, then use the Resize row dialog and enter a custom height. This will set every selected row to that exact height, overriding any previous custom sizes.

Can I use a formula to set row height?

No, row height cannot be controlled by a formula. It is a formatting property, not a value. You must use the manual methods described above.

Does row height affect the print output?

Yes, row height directly affects how many rows fit on a printed page. If you want to control the print layout, it’s best to set custom row heights and adjust the print scale in the print settings.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.