Ways to move, merge, hide, and change rows in Google Sheets

Google Sheets lets you manage rows in many different ways: move, hide and unhide, change their height, and merge multiple rows into one. A special styling tool will also make your table easy to understand and work with.

Quick ways to format Google Sheets header row

Headers are a mandatory part of any table – it's where you give names to its content. That is why the first row (or even a few lines) is usually turned into a header row where each cell hints about what you will find in the column below.

To distinguish such a row from others right away, you may want to change its font, borders, or a background color.

To do that, use the Format option in the Google menu or the standard utilities from the Google Sheets toolbar:
Two ways to format rows in Google Sheets: the main menu and styling tools on the toolbar.

Another useful tool that helps formatting tables and their headers is Table Styles. After you install it, go to Add-ons > Table Styles, and choose one of 3 options:

  • Create new style from selection
  • Apply the style that already exists to the selection
  • Manage existing table styles

Apply style to a selection with Table Styles add-on.

Mainly, the styles differ in their color schemes. However, you can format different parts of the table in different ways, whether it's a header row, left or right column, or other parts. This way you will personalize your tables and highlight the most important data.
Choose the style among existing ones and apply to any part of your table.

The main advantage of Table Styles lies in the ability to create your own styling templates. Just select the table and go to Add-ons > Table Styles > Create style from selection. A new style will be created, and you'll be able to adjust it to your liking.

Note. The default styles that exist in the add-on cannot be edited. The tool lets you add, edit, and delete your own styles only.

Click on the table style you created to edit or delete it.

Choose the part of the table that you want to change, set its appearance, and click Save:
Highlight header rows with the Table Styles add-in.

All these options make Table Styles a great tool that formats entire tables and their separate elements, including Google Sheets header row.

How to move rows in Google Sheets

It may happen that you will need to rearrange your table by moving one or more rows to another place. There are a few ways to do that:

  1. Google Sheets menu. Highlight your line and choose Edit – Move row up / down. Repeat the steps to move it further.
    Use the Google Sheets menu to move rows up and down.
  2. Drag and drop. Select the row and drag-and-drop it to the needed position. This way you can move the row a few columns up and down.

How to hide and unhide rows in a spreadsheet

All tables may contain lines with the data that is used for calculations but is unnecessary for displaying. You can easily hide such rows in Google Sheets without losing the data.

Right-click the line you'd like to hide and choose Hide row from the context menu.
Select the corresponding option from the context menu to hide rows.

Row numbers don't change, however, two triangles prompt that there is a hidden line. Click on those arrows to reveal the row back.
Click the pair of triangles to reveal the hidden row.

How to merge rows and cells in Google Sheets

You can not only move, delete, or hide rows in your Google Sheets – you can merge them to make your data look more elegant.

Note. If you merge all rows, only the contents of the top leftmost cell will be saved. Other data will be lost.

There are few cells in my table that have the same information (A3:A6) one under another. I highlight them and choose Format > Merge cells > Merge vertically:
Merge rows using the Google Sheets menu.

4 cells from 4 rows are joined, and since I decided to Merge vertically, the data from the top cell is displayed. If I choose to Merge all, the contents of the top leftmost cell will remain:
Merge cells from a few rows into one cell.

There's one interesting case in Google Sheets – when you need to combine not only rows but entire tables. For example, weekly sales reports could be joined into one monthly report and furthermore into a quarter or even yearly report. Convenient, isn't it?

The Merge Sheets add-on for Google Sheets lets you combine 2 tables by matching the data in key columns and updating other records.

Change row height in a Google spreadsheet

You can improve the layout of your table by changing the height of some lines, a header row in particular. Here are a couple of easy ways to do that:

  1. Hover the cursor over the bottom border of the row, and when the cursor turns into an Up Down Arrow, click and resize it as you need:
    Resize header row in Google Sheets.
  2. Use the context menu. Right-click the needed row and choose to Resize row. This way is especially useful when you need to have multiple lines of the same height. Simply select them all and go for the context menu:
    Resize row using the context menu and enter the needed height in pixels.

How to count rows with data in Google Sheets

At last, our table is created, the information is entered, all rows and columns are right where they should be and of the needed size.

Let's count how many lines are completely filled with data. Perhaps, we'll find that some cells were forgotten and left empty.

I'll use the COUNTA function – it calculates the number of non-empty cells in the selected range. I want to see how many rows there are with the data in columns A, B, and D:


Tip. To include additional rows that may be added in time to your formula, make sure to use the entire column as the formula's argument rather than a definite range.

Count non-empty cells to see if some entries are missing in the table.

As you can see, formulas return different results. Why is that?

Column A has vertically merged cells, all rows in column B are filled with data, and only one cell in column C misses the entry. That is how you can localize empty cells in the rows of your table.

I hope this article will make your work with rows in Google Sheets a bit easier and more pleasant. Feel free to ask questions in the comments section down below.

You may also be interested in