Microsoft Excel – deleting all blank rows in a worksheet

If you have several empty rows in an Excel worksheet, it is a bit of a nuisance to go through and delete them all manually. You can select blanks cells, using Go to Special, but if you are not careful you will end up deleting rows that contain a few blank cells rather than being completely blank rows.

Instead, go to the column to the right of any data and set up a formula:

=countblank(a2:?2) where ? is the previous column letter

Copy the formula down to the end of the column.

Blank rows

Now, put on a filter on that column (Data – Filter) and filter so you are just seeing the rows with the maximum number of blanks (these rows will be completely blank).

Blank rows

Delete these rows, clear the filter and delete your extra column.

You will now have removed the blank rows.

Blank rows

Find out more about our Microsoft Excel training London, UK.

Find out more about our Microsoft Excel training Wiltshire, Hampshire, Dorset.


About jdonbavand

I am a trainer of Microsoft Office, Microsoft Project and Crystal Reports. I have called my blog "If Only I'd Known That...." because I hear it so many times in training sessions. In fact, if only I had a £100 (or 150 Aussie dollars)for every time someone says "If only I'd known that." ....
This entry was posted in Microsoft Excel, Microsoft Excel 2007, Microsoft Excel 2010, Microsoft Excel 2013, Microsoft Excel 2016 and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s