How to Delete All Empty Rows and Columns in Google Sheets

Since Google rolled its productivity apps into Google Drive, the three major applications—Docs, Sheets, and Slides—have attracted hundreds of millions of users over the world who are looking for a free, yet powerful, cloud-based alternative to Microsoft’s Office suite of products. Though all three apps don’t quite equal the power and functions of Microsoft’s infamous productivity apps, for most users, all three products represent a “good-enough” middleground between other free Office replacements and Office itself. Plus, you get the full power of Google and Gmail behind the applications, which make sharing, annotating, and collaborative editing with other users a snap.

Google Sheets is the Microsoft Excel-equivalent for Google Drive, and though it can’t quite compete with Microsoft’s legacy application, Sheets holds its own as a powerful spreadsheet tool capable of balancing budgets, performing equations, and keeping track of your data in real time. Many of Excel’s features are replicated or mirrored inside Sheets, making it easy to make the switch from Microsoft’s productivity suite to Google’s own offerings. Unfortunately, as with any software, problems can occasionally crop up when trying to use Sheets, and there isn’t one problem more annoying than when random empty cells, rows, and columns appear inside your document. And though this is easily manageable in smaller sheets by deleting these rows manually, larger documents can be nothing but a headache.

No worries, though—we’re here to help. Removing these cells is quick and easy if you know the proper steps. Though removing rows one-by-one is certainly possible, it can take up a lot of your time and energy to do so. So instead, here’s how to remove all the empty rows and columns from Google Sheets, as fast as possible.

Setting Up an Autofilter

In order to remove those blank columns and rows, we have to start by understanding what an autofilter is inside of Google Sheets. Users who are familiar with either Sheets or Microsoft Excel will recognize the importance of an autofilter, but other users new to the program might not understand how to use an autofilter to sort your data. Put simply, an autofilter takes the values inside your Excel columns and turns them into specific filters based on the contents of each cell—or in this case, the lack thereof. Though originally introduced in Excel 97, autofilters (and filters in general) have become a massive part of spreadsheet programs, despite the fraction of people that know about and use them.

What’s great about autofilters is their ability to be used for a number of different sorting methods. In fact, they’re powerful enough to sort and push all of our the empty boxes to the bottom or top of your spreadsheet. Start by opening up the spreadsheet that contains the empty rows and columns you want to remove from your document. Once the document has opened, add a new row at the very top of your spreadsheet. Label the first cell (A1) whatever you’d like to call your filer. This will be the header cell for the filter we’re about to create. After creating the new row, find the Filter icon in the command row inside Google Sheets. It’s pictured below; its general appearance is similar to an upside down triangle with a line running out the bottom, like a martini glass.

Clicking this button will create a filter, highlight a few of your cells in green on the left side of the panel. Because we want this filter to extend to the entirety of our document, click the small dropdown menu next to the filter icon. Here, you’ll see several options for changing your filters. At the top of the list, select “Create new filter view.”

Your Google Sheets panel will extend and turn a dark grey color, along with an entry point for you to insert the parameters of your filter. It’s not so much important that you include every single column, but ensure that you’ve included every row and column in your document that contains blank spaces. If this means inputting the entirety of your document, so be it. To input this into your document, type something like A1:G45, where A1 is the starting cell and G45 is the ending cell. Every cell in between will be selected in your new filter.

Using the Autofilter to Move Blank Cells

This next bit may seem a bit odd, because it will be moving and reorganizing your data in a way that seems counterintuitive at best and destructive at worst. Once your filter has selected the infected area in your doc (or, more likely, the entire spreadsheet), click the green triple-line icon in the A1 column of your spreadsheet where you set a title earlier. Select “Sort A-Z” from this menu. You’ll see your data move into alphabetical order, beginning with numbers and followed by letters.

The blank spaces, meanwhile, will be pushed to the bottom of your spreadsheet. Continue to resort your spreadsheet column by column until your blank cells have moved to the bottom of the display and you have one solid block of data displayed at the top of Google Sheets. This will likely make your data a confusing, unreadable mess—again, this will all work out in the end.

Deleting Your Blank Cells

Once your blank cells have been moved to the bottom of your spreadsheet, deleting them is as simple as deleting any other cell. Use your mouse to highlight and select the blank cells on your spreadsheet that have been moved to the bottom of the document. Depending on the amount of blank cells and the working area of your spreadsheet, you might want to zoom out of your display a bit to see more of the surrounding area (most browsers, including Chrome, allow you to zoom by using Ctrl/Cmd and the + and – buttons; you can also hold down Ctrl/Cmd and use the scroll wheel on your mouse or touchpad). Click and hold to select the surrounding blank cells and drag your mouse across every cell.

After selecting the offending cells, right click anywhere in the highlighted areas. You’ll see a pop-up menu containing several different options for your cells, including cut, copy, and paste, and the ability to insert comments and notes. About midway through the menu are the options for deletion, including deleting rows, columns, and deleting cells. Because all of your blank cells have been sorted into rows, the easiest method is to select row deletion, which will remove all content from your selected blank rows. You can also delete specific cells by choosing a shift method; since your blank cells are in one block, your shift method doesn’t matter.

Reorganizing Your Spreadsheet

Now that you’ve removed the offending blank cells, you can reorganize your spreadsheet back into a normal order. While clicking on that same triple-lined menu button from earlier inside the filter will only allow you to organize in alphabetical or reverse-alphabetical order, there’s another sort option: turning your autofilter off. To do this, click the triangle menu button next to the autofilter icon inside Sheets. Inside this menu, you’ll see an option for your filter (called “Filter 1,” or whatever number filter you’ve made), as well as an option for “None.” To turn off the filter you applied earlier, simply select “None” from this menu. Your spreadsheet will return to normal without the blank cells you deleted earlier.

With the cells deleted, you can resume reorganizing and adding data back into your spreadsheet. If, for whatever reason, this method causes your data to fall out of order, reversing it is as simple as diving into your documents’ history and reverting to an earlier copy. You can also use the copy and paste function to move your data around easily, without having to deal with hundreds of blank cells blocking your path. This isn’t a perfect solution—Sheets doesn’t make deleting blank cells easy in general—but it does work as a quick and dirty way to push your data above the mass of blank cells in your document. And at the end of the day, it’s a lot easier than mass-deleting rows one by one.

Let us know your favorite method in the comments below for deleting blank cells from Google Sheets!

Thanks to commenter Martin for letting us know about this tip.

Posted by Jamie on August 27, 2017

3 thoughts on “How to Delete All Empty Rows and Columns in Google Sheets”

Martin says:
Not the most helpful post unfortunately – bordering on clickbait.

Not sure if this helps others but, to do this quickly and semi-manually (i.e. without Macros), you can potentially use the autofilter setting to quickly move the blank rows to the bottom end of a data set. Say you have a long single column of entries with some cells blank, some cells full and you want to remove the empty cells so all the data is in one block:

1) insert a row above the data set and, in the cell above the data, enter a title (this will be the header cell for the filter)

2) click the filter button (in Google sheets it looks like a triangle with a flat side at the top and a little line out the bottom)

3) sort by A to Z

4) all your blanks cells will pop to the bottom and you have one block of data

With a data set of a number of columns, you can select and filter the entire data set to remove the blanks and then apply filters again to reorganise the data without the blank cells.

Hope that helps.

Paul says:
Why did you make this useless article? I have over 300,000 rows. I do not want to delete the empty ones MANUALLY.

What’s next, a tutorial on how to breathe without falling over?

Vince says:
The reason I Googled this problem is because I didn’t want to do it manually, as I have a LOT of alternating empty rows. This still only explains how to do it manually… 🙁
carlos victor says:
hahaha Exactly my case.
Glenda Ward says:
Same here. I have a sheet using 17 rows and there are 12 empty pages starting on row 18. Manually deleting them is ridiculous.

Leave a Reply

Your email address will not be published. Required fields are marked *