Delete empty rows from excel

When importing and copying tables in Excel, empty strings and cells can be formed. They always district and interfere with the work.

Some formulas may not work correctly. It is impossible to use a number of tools for an incompletely filled range. We will learn how to quickly delete empty cells at the end or middle of a table. We will use simple tools available to the user of any level.



How to remove empty rows in the Excel table?

To show you how to delete extra lines, to illustrate the order of actions, take a table with conditional data:

conditional data.

Example 1: Sorting data in a table. Select the entire table. Open the «DATA» tab — «Sort and Filter» tool — press the «Sort» button. Another way is to right-click on the selected range and do the sorting «A to Z».

sorting.

Empty rows after sorting in ascending order are at the bottom of the range.

If the order of the values is important, then before the sorting, you need to insert an empty column, make a through numbering. After sorting and deleting blank lines, sort the data by the inserted column with the numbering again.

Example 2: Filter. The range must be formatted as a table with headers. We select the «cap». On the «DATA» tab, we click the «Filter» button («Sort and Filter»). A down arrow appears to the right of each column name. Push — opens the filtering window. Remove the selection in front of the name «Empty».

Empty.

You can delete empty cells in the Excel line the same way. Select the required column and filter its data.

Example 3: Selecting a group of cells. Select the entire table. In the main menu on the «Edit» tab we click the button «Find and Select». Select the «Go To Special» tool. In the window that opens, select the «Blanks».

Blanks.

The program marks empty cells. On the main page we find the «HOME»-«Delete»-«Delete Cells».

Delete Cells.

The result is a filled range of «no voids».

Attention! After the removal, some of the cells jump upwards — the data can be messed up. Therefore, for the overlapping ranges, the instrument is not suitable.

Helpful advice! The shortcut to delete the selected row in Excel is CTRL + «-«. And for its selection, you can press the hotkey combination SHIFT + SPACEBAR.



How to remove repeated rows in Excel?

To remove the same rows in Excel, select the entire table. Go to the tab «DATA»-«Data Tool»-«Delete Duplicates».

Delete Duplicates.

In the window that opens, select those columns that contain duplicate values. Since you need to delete duplicate rows, all columns should be highlighted. After clicking OK Excel creates a mini-report of the form:

creates a mini-report.

How to remove each second line in Excel?

You can use the macro to break the table. For example, this:

Sub Delete_Every_Other_Row()
' Dimension variables.
Y = False ' Change this to True if you want to
' delete rows 1, 3, 5, and so on.
I = 1
Set xRng = Selection
' Loop once for every row in the selection.
For xCounter = 1 To xRng.Rows.Count
' If Y is True, then...
If Y = True Then
' ...delete an entire row of cells.
xRng.Cells(I).EntireRow.Delete
' Otherwise...
Else
' ...increment I by one so we can cycle through range.
I = I + 1
End If
' If Y is True, make it False; if Y is False, make it True.
Y = Not Y
Next xCounter
End Sub

And you can do it by hand. We offer a simple way, accessible to each user.

  1. At the end of the table, make an auxiliary column. Fill with alternate data. For example, «N Y N Y», etc. We enter values in the first four cells. Then select them. «We catch» for the black cross in the lower right corner and copy the letters to the end of the range.
  2. copy the letters.

  3. Install the «Filter». Filter the last column by the value of «Y».
  4. Filter.

  5. Select all that is left after filtering and delete.
  6. filtering and delete.

  7. We remove the filter — only cells with «N» will remain.

remove the filter.

The auxiliary column can be eliminated and operated with a «decimated table».

How to delete hidden rows in Excel?

When the user had hidden some information in the rows he was not distracted from his work. I thought that later the data would be needed. It is not needed — hidden rows can be deleted: they affect the formulas, interfere.

In the training table are hidden rows 5, 6, 7:

training table.

We will remove them.

  1. Go to «FILE»-«Info»-«Check for Issues» the tool «Inspect Document».
  2. Inspect Document.

  3. In the opened window, put a tick in front of the «Hidden Rows and Columns». Click «Inspect».
  4. Inspect.

  5. After a few seconds, the program displays the result of the test.
  6. Remove All.

  7. Click «Remove All». A corresponding notification will appear on the screen.

As a result of the work done, the hidden cells are deleted, the numbering is restored.

Thus, remove the empty, repeating or hidden cells of the table using the built-in functionality of the Excel program.

Easy Ways to Remove Blank or Empty Rows in Excel

by Avantix Learning Team | Updated April 5, 2021

Applies to: Microsoft® Excel® 2010, 2013, 2016, 2019, 2021 and 365 (Windows)

You can delete blank rows in Excel using several tricks and shortcuts. Check out these 5 fast ways to remove blank or empty rows in your worksheets.

In this article, we’ll focus on methods that work with all versions of Excel. In future articles, we’ll take a look at other methods available in Excel 365.

Here, we’re assuming your data is in ranges of cells with data arranged vertically below row headings or field names (and no merged cells). Excel recognizes data arranged in this way as a list or data set (or database). You can also use many of these strategies with Excel tables.

Recommended article: 15 Microsoft Excel Keyboard Shortcuts to Speed Up Formatting

Do you want to learn more about Excel? Check out our virtual classroom or live classroom Excel courses >

If you want to delete one row, you can delete the row manually:

  1. Select the row. Click its heading or select a cell in the row and press Shift + spacebar.
  2. Right-click the selected row heading. A drop-down menu appears.
  3. Select Delete.

1. Deleting blank rows using the context menu

To delete multiple contiguous blank rows using the context menu:

  1. Drag across the row headings using a mouse or select the first row heading and then Shift-click the last row heading.
  2. Right-click one of the row headings. A drop-down menu appears.
  3. Select Delete.

To delete multiple non-contiguous blank rows using the context menu:

  1. To select non-contiguous rows, click the heading of the first row and then Ctrl-click the headings of the other rows you want to select.
  2. Right-click one of the row headings. A drop-down menu appears.
  3. Select Delete.

2. Deleting blank rows using a keyboard shortcut

To delete multiple contiguous blank rows using a keyboard shortcut:

  1. Drag across the row headings using a mouse or select the first row heading and then Shift-click the last row heading.
  2. Press Ctrl + – (minus sign at the top right of the keyboard) to delete the selected rows.

To delete multiple non-contiguous blank rows using a keyboard shortcut:

  1. To select non-contiguous rows, click the heading of the first row and then Ctrl-click the headings of the other rows you want to select.
  2. Press Ctrl + – (minus sign at the top right of the keyboard) to delete the selected rows.

3. Deleting blank rows by sorting

An easy way to delete blank rows is to sort the data so that blanks appear at the bottom and you can then ignore them.

To delete blank rows by sorting:

  1. Select the entire range of data (not just the column you want to sort).
  2. Click the Data tab in the Ribbon.
  3. Select Sort in the Sort & Filter group. A dialog box appears. Assuming you have a header row, select My data has headers.
  4. Beside Sort by, select the field or column with the blanks you want to remove and then select the appropriate sorting option (such as A-Z, smallest to largest, ascending or descending) to display blanks at the bottom of the data set.
  5. Click OK. Blank rows will now appear at the bottom of the data set and can be ignored.

Below is the Sort dialog box:

Sort dialog box in Excel to sort and remove or delete blank rows.

4. Deleting blank rows using Go to Special to highlight blanks

A great way to remove blank rows in a range of data is to use Go to Special.

The Go To Special dialog box displays the following options:

 Excel Go to Special dialog box to find and delete blank rows.

To find and remove blank rows using Go to Special:

  1. Select one column where there are blank cells in the column (we’re assuming here that the rest of the row is blank). If there is sensitive data above or below the list that you don’t want to delete, select the cells in the column from the first cell in the range to the last cell in the range (you could click in the first cell and Shift-click in the last cell).
  2. Press Ctrl + G. The Go To dialog box appears.
  3. Click Special to display the Go To Special dialog box. Alternatively, you can click the Home tab in the Ribbon and then select Go To Special from the Find & Select drop-down menu.
  4. Select Blanks in the Go to Special dialog box and click OK. Excel will select all of the blank cells within the selected range.
  5. Right-click one of the selected blank cells and select Delete. A dialog box appears.
  6. Select Entire Row.
  7. Click OK.

The Delete dialog box appears as follows:

 Excel dialog box to delete blank rows after right-clicking.

Although you can also use the Find command to find blanks, it’s much easier to use Go to Special.

5. Deleting blank rows using filtering

You can also delete blank rows using filtering (traditionally called AutoFiltering).

To delete blank rows using Filter:

  1. Select the range of cells that includes all of the data in the data set (including blank rows).
  2. Click the Data tab in the Ribbon.
  3. Select Filter in the Sort & Filter group. Alternatively, you can press Ctrl + Shift + L. Arrows appear beside the field names.
  4. Click the arrow beside the field name with the blank cells in  rows you want to delete.
  5. Turn off or de-select Select All.
  6. Select Blanks. You will likely need to scroll down to select Blanks.
  7. Select the row headings of the filtered rows by clicking the first row heading and Shift-clicking the last row heading.
  8. Right-click one of the selected headings. A drop-down menu appears.
  9. Select Delete Row.
  10. Click the Data tab in the Ribbon and select Clear in the Sort & Filter group to remove the filtering.

In the example below, the Promotion field is filtered to display blanks:

Display blanks using Filter in Excel to remove or delete blank rows.

You will now be able to sort, filter and create pivot tables with the list.

Subscribe to get more articles like this one

Did you find this article helpful? If you would like to receive new articles, JOIN our email list.

More resources

How to Use Flash Fill in Excel (4 Ways with Shortcuts)

How to Lock Cells in Excel (Protect Formulas and Data)

3 Excel Strikethrough Shortcuts to Cross Out Text or Values in Cells

Use Conditional Formatting in Excel to Highlight Dates Before Today (3 Ways)

How to Replace Blank Cells in Excel with Zeros (0), Dashes (-) or Other Values

Related courses

Microsoft Excel: Intermediate / Advanced

Microsoft Excel: Data Analysis with Functions, Dashboards and What-If Analysis Tools

Microsoft Excel: Introduction to Power Query to Get and Transform Data

Microsoft Excel: New and Essential Features and Functions in Excel 365

Microsoft Excel: Introduction to Visual Basic for Applications (VBA)

VIEW MORE COURSES >

Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at info@avantixlearning.ca if you’d like to arrange custom instructor-led virtual classroom or onsite training on a date that’s convenient for you.

Copyright 2023 Avantix® Learning

Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.

Avantix Learning |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at info@avantixlearning.ca

Blank rows of data can be a big annoyance.

They’ll make certain things like navigating around our data much more difficult.

But the good news is there are lots of ways to get rid of these unwanted rows and it can be pretty easy to do it.

In this post, we’re going to take a look at 9 ways to remove blank rows from our Excel data.

Delete Blank Rows Manually

The first method is the manual way.

Don’t worry, we’ll get to the easier methods after. But if we only have a couple rows then the manual way can be quicker.

Select the blank rows we want to delete. Hold Ctrl key and click on a row to select it.

When the rows we want to delete are selected then we can right click and choose Delete from the menu.

We can also delete rows using a ribbon command. Go to the Home tab ➜ click on the Delete command ➜ then choose Delete Sheet Rows.

There is also a very handy keyboard shortcut to delete rows (columns or cells). Press Ctrl + on the keyboard.

That’s it! Our blank rows are gone now.

Delete Blank Rows Using Go To Special

Selecting and deleting rows manually is OK if we only have a couple rows to delete.

What if there are many blank rows spread across our data? Manual selection would be a pain!

Don’t worry, there is a command in Excel to select all the blank cells for us.

First, we need to select a column of our data including all the blank rows. The easiest way to do this will be to select the first cell (A1 in this example) then hold the Shift key and select the last cell (A14 in this example).

Now we can use the Go To Special command to select only the blank cells. Go to the Home tab ➜ press the Find & Select command ➜ choose Go To Special from the menu.

There’s also a handy keyboard shortcut for the Go To menu. Press Ctrl + G to open up the Go To menu then click on the Special button to open up the Go To Special menu.

Whether we open up the Go To menu then click Special or we go directly to the Go To Special menu, we will arrive at the same Go To Special menu.

Now all we need to do is select Blanks from the options and press the OK button.  This will select only the blank cells from our initial column selection.

Now we need to delete those selected rows.

  1. Use any delete rows method from the Delete Blank Rows Manually section.
    • Right click ➜ Delete
    • Home tab ➜ Delete ➜ Delete Sheet Rows
    • Ctrl + keyboard shortcut
  2. In the Delete menu select Entire row and press the OK button.

Like magic, we can find and delete hundreds of blank rows in our data within a few seconds. This is especially nice when we have a lot of blank rows scattered across a long set of data.

Delete Blank Rows Using Find Command

This method is going to be very similar to the above Delete Blank Rows Using Go To Special method. The only difference is we will select our blank cells using the Find command.

Just like before, we need to select a column in our data.

Go to the Home tab ➜ press the Find & Select command ➜ choose Find from the menu.

There is also a keyboard shortcut we can use to open the Find menu. Press Ctrl + F on the keyboard.

Either way, this will open up the Find & Replace menu for us.

  1. Expand the Advanced options in the Find menu.
  2. Leave the Find what input box blank.
  3. Select the Match entire cell contents option.
  4. Search Within the Sheet.
  5. Look in the Values.
  6. Press the Find All button to return all the blank cells.

This will bring up a list of all the blank cells found in the selected range at the bottom of the Find menu.

We can select them all by pressing Ctrl + A. Then we can close the Find menu by pressing the Close button. Now we can delete all the blank cells like before.

Delete Blank Rows Using Filters

We can also use filters to find blank rows and delete them from our data.

First, we need to add filters to our data.

  1. Select the entire range of data including the blank rows.
  2. Go to the Data tab.
  3. Press the Filter button in the Sort & Filter section.

We can also add filters to a range by using the Ctrl + Shift + L keyboard shortcut.

This will add sort and filter toggles to each of the column headings and we can now use these to filter out the blank.

  1. Click on the filter toggle on one of the columns.
  2. Use the Select All toggle to de-select all items.
  3. Check the Blanks.
  4. Press the OK button.

When our data is filtered, the row numbers appear in blue and filtered rows are numbers are missing.

We can now select these blank rows with the blue row numbering and delete them using any of the manual methods.

We can then press the OK button when Excel asks us if we want to Delete entire sheet row.

When we clear the filters, all our data will still be there but without the blank rows!

We can use filters in a slightly different way to get rid of the blank rows. This time we will filter out the blanks. Click on the filter toggle on one of the columns ➜ uncheck the Blanks ➜ press the OK button.

Now all our blank rows are hidden and we can copy and paste our data to a new location without all the blank rows.

Delete Blank Rows Using Advanced Filters

Similar to filter method, we can use the Advanced Filters option to get a copy of our data minus any blank rows.

To use the Advanced Filters feature, we’re going to need to do a bit of setup work.

  1. We need to set up a filter criteria range. We are only going to filter based on one column, so we need one column heading from our data (in F1 in this example). Below the column heading we need our criteria (in F2 in this example), we need to enter ="" into this cell as our criteria.
  2. Select the range of data to filter.
  3. Go to the Data tab.
  4. Select Advanced in the Sort & Filter section.

Now we need to configure the Advanced Filter menu.

  1. Select Copy to another location.
  2. Select the range of data to be filtered. This should already be populated if the range was selected before opening the advanced filters menu.
  3. Add the criteria to the Criteria range (F1:F2 in this example).
  4. Select where in the sheet to copy the filtered data.
  5. Press the OK button.

We now get a copy of our data in its new location without the blanks.

Delete Blank Rows Using The Filter Function

If we are using Excel online or Excel for Office 365, then we can use one of the new dynamic array functions to filter out our blank rows.

In fact, there is a dynamic array FILTER function we can use.

FILTER Function Syntax

= FILTER ( Array, Include, [Empty] )
  • Array is the range of data to filter.
  • Include is a logical expression indicating what to include in the filtered results.
  • Empty is the results to display if no results based on the Include argument are found.

FILTER Function To Filter Blanks

= FILTER ( CarData, CarData[Make]<>"" )

The above function needs to be entered in only one cell and the results will spill into the remaining cells as needed. The function will filter the CarData on the Make column and filter out any blanks.

It’s easy and the great part is it’s dynamic. Because our data is in an Excel table, when we add new data into the CarData table, it will appear in our filtered results.

Delete Blank Rows By Sorting

In addition to all the filtering techniques, we can sort our data to get all the blank rows.

  1. Select the range of data.
  2. Go to the Data tab.
  3. Press the sort command. Either the ascending or descending order will work.

Now all our blank rows will appear at the bottom and we can ignore them.

If we need the original sort order of our data, we can add an index column before sorting. Then we can sort to get the blank rows at the bottom and delete them. Then we sort our data back to the original order based on the index column.

Delete Blank Rows Using Power Query

Power can easily remove blank rows in our data.

This is great is we keep getting updated data with blanks in it and need to include this in our data preparation steps.

Once our data is inside the power query editor, we can easily remove our blank data. Notice, these appear as null values inside the editor.

  1. Go to the Home tab in the power query editor.
  2. Press the Remove Rows button.
  3. Select the Remove Blank Rows option from the menu.
= Table.SelectRows(#"Changed Type", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null})))

This will generate the above M code using the Table.SelectRows function to select the non-null rows. This will only remove rows where the entire record has null values.

We could also get the same result by filtering out the null values in our data. Right click on any of the sort and filter toggles then uncheck the null value and press the OK button.

= Table.SelectRows(#"Changed Type", each ([Model] <> null))

Power query will again generate a step with the Table.SelectRows function, returning non-null values in a specific column.

Delete Blank Rows Using Power Automate

This one might not be as quick, easy and practical as the other methods but it can be done.

We can use Power Automate to delete blank rows in our Excel tables.

In order to do this with Power Automate, we will need to have our data in an Excel table and it will need an ID column that uniquely identifies each row.

We can set up a small Flow automation to do this.

  1. We will use a manual button to trigger our flow, but we could use any number of triggers.
  2. We then need to List rows present in a table to get all the rows of data from our Excel table. The best option would also be to use the Odata filters in the Show advanced options section to filter on the blank rows, but this is currently not possible to filter on blanks.
  3. Because we can’t filter on the blank values with Odata filters, we need to use a Filter array data operation action to do this. We can filter on the values from the List rows present in a table action and set the condition as Make is equal to blank (leave the value empty). This will get us all the rows with blank cells.
  4. We can now use the Delete a row action to delete these blank rows. We can select our ID column as the Key Column and then add the ID field from the Filter array action. This should wrap the action in an Apply to each step to delete all the blanks.

When this automation runs, it will delete any blank rows the table has.

Conclusions

Blank rows in our data can be a nuisance.

Removing them is easy and we have lots of options.

My favourite way is probably the Go To keyboard shortcut method. It’s quick, easy and does the job.

Did I miss any methods? Let me know in the comments below!

About the Author

John MacDougall

John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.

This example teaches you how to delete blank rows or rows that contain blank cells.

1. On the Home tab, in the Editing group, click Find & Select.

Click Find & Select

2. Click Go To Special.

Click Go To Special

3. Select Blanks and click OK.

Select Blanks

Excel selects the blank cells.

Delete Blank Rows in Excel

4. On the Home tab, in the Cells group, click Delete.

Click Delete

5. Click Delete Sheet Rows.

Delete Sheet Rows

Result:

Delete Blank Rows Result

The following awesome trick only removes rows that are completely empty and leaves rows with a few empty cells.

6. Add a Blanks column and insert the COUNTA function.

Blanks Column

7. Click on the lower right corner of cell H2 and drag it down to cell H10.

Remove Empty Rows in Excel

If the COUNTA function returns a 0, the row is «completely empty». To filter these empty rows, execute the following steps.

8. Select cell H1.

9. On the Data tab, in the Sort & Filter group, click Filter.

Click Filter

Arrows in the column headers appear.

Filter Arrows

10. Click the arrow next to Blanks.

11. Click on Select All to clear all the check boxes, and click the check box next to 0.

Filter Empty Rows

12. Click OK.

Result. Excel only displays the rows that are completely empty.

Empty Rows

13. Delete these rows.

14. Click Filter again to remove the filter.

15. Delete the Blanks column.

Result:

Remove Empty Rows Result

Skip to content

How To Delete Blank Rows In Excel: Step-by-Step (2023)

How To Delete Blank Rows In Excel: Step-by-Step (2023)

Everyone hates empty rows in their data.

Fortunately, there are 2 ways to remove all the blank rows in your spreadsheet – in just a few clicks.

Which method fits you best comes down to this really important distinction:

1) “I want to delete rows that contain 1 or more blank cells”

2) “I want to delete rows if they only contain blank cells”

Let’s dive in🤿

Oh, and click here to download the Excel file I’m using in this guide.

How to delete blank rows if 1 or more cells are blank

This method deletes rows in your data if they contain 1 or more blank cells.

Blank rows in Excel - example

That means rows like the 3 ones shown in the screenshot would be considered as blanks, and then removed.

If that’s the kind of empty rows you want to remove, follow these steps:

1. In the Home tab, click the ‘Find & Select’ button on the right side of the Ribbon, so you can start to find blank rows.

Click Find and Select from Home tab

2. Select ‘Go To Special’.

Click Go To Special to select all the blank cells in the data

3. Select Blanks and click OK.

This select only the blank cells in your data.

Select blanks in go to special dialog box

Now, you need to delete entire rows instead of just the selected cells.

4. From the Home tab, click the arrow below the Delete button and choose ‘Delete Sheet Rows’.

Go to special: delete blank rows in Excel

And that’s how to delete blank rows in Excel.

Well…

If blank rows = rows that contain 1 or more blank cells⚠️

This is quite important, as you can accidentally remove empty rows that shouldn’t have been removed if you just blindly use this method.

If you mean blank rows must be completely empty before they should be deleted, use the method below instead.

PRO TIP: Shortcuts

You can use these shortcuts to open the ‘Go To Special’ dialog box instead of the method above:

  • Press F5 (for Windows and Mac)
  • Press Ctrl + G and click the ‘Special’ button (for Windows and Mac)

And continue with the remaining steps from above to remove blank rows.

How to delete blank rows if all cells are blank

This is what I’d call the proper way to remove blank rows. Although it’s a bit more cumbersome.

It’s more restrictive, meaning that it generally will remove less rows than the method above✂️

This way, a row will only be considered to be blank there are only empty cells in the entire row (within the columns of the data set).

Only one blank row - example

In the screenshot, only 1 row is completely blank, while the other 3 highlighted rows are partially blank.

Now, to remove completely blank rows with this method, follow these steps:

1. Select the relevant columns (A, B, and C).

Select all the columns in the data in their entirety

Make sure you select the entire columns. If you don’t, you won’t filter the entire dataset and you won’t be successful when you remove blank rows in a few seconds.

2. Go to the Data tab and click the Filter button.

Click the Filter button from the data tab

And you can see the filter buttons next to each of the column headers.

3. Click the first filter button and make sure there’s only a checkmark in the Blanks checkbox.

You do that by unchecking the ‘Select All’ option before putting the checkmark in Blanks.

Set filtered rows to blank rows only

Now, only rows that have empty cells in column A are visible.

Two empty rows and two partially blank rows visible from autofilter

If you used method 1, row 2 would be considered a blank row and would be deleted🤔

4. Repeat step 3 for all other columns in the data set.

In this case, it’s only column B and C.

So, for each data column, go into the filter, uncheck ‘Select all’ and make sure there’s a checkmark in Blanks.

Repeat filtering from so only true blank rows are visible

This leaves only the real empty rows.

5. Select all the blank rows.

Select entire blank rows

6. Click the drop-down arrow below the ‘Delete’ button in the Home tab, and select ‘Delete Sheet Rows’.

Delete blank rows that are visible after filtering

And that’s how to remove blank rows in Excel -> the proper way.

7. Remove the filter by clicking the Filter button.

From data tab - remove filter to show full data set with no blank rows

And your blank rows are gone!

Full data set after delete blank rows

Keep in mind the rows partially empty rows are still visible.

Pretty cool, huh?😎

Video guide: Delete blank rows

Want to watch how to remove blank rows on video instead of reading?

Then see my Youtube video and learn everything you need to know about this proper way to delete blank rows.

Delete blank rows individually

If you need to get rid of a small number of blank rows, you can do it manually – one blank row at a time.

Just right-click on the single row number for the row you want to delete.

And select Delete.

Right click to delete blank rows individually

Then it’s gone!

Pretty easy right?

That way, you can assess whether the row is to be considered a blank row or not.

Obviously, this method takes way too long in big spreadsheets⏳

That’s it – Now what?

That’s how to delete blank rows in Excel.

Both ways are fine for deleting blank rows. One is quick and one is thorough.

But be aware that with the quick method (first method), you might remove blank rows that shouldn’t be deleted.

So, while the quick for deleting blank rows works in some scenarios, I definitely recommend learning the “hard” way.

The reason why you’re deleting blank rows in the first place is to ensure there are no gaps in your data.

This helps with calculations!

But you know what also helps with calculations?

Learning the absolute best functions Microsoft Excel has to offer.

Click here to read more about my free training that teaches you IF, SUMIF, VLOOKUP, and pivot tables.

It’ll make you an Excel wizard in just 30 minutes.

Kasper Langmann2023-01-19T12:25:51+00:00

Page load link


Download Article


Download Article

If your spreadsheet is plagued with empty rows, deleting all of them by hand may seem like a monumental task. It’s easy enough to delete a single row on your own, but if you need to delete multiple blank rows you’ll want to let Excel do the heavy lifting for you. Luckily there are some not-so-obvious tools that can make the process incredibly effortless.

  1. Image titled Delete Empty Rows in Excel Step 1

    1

    Find the row that you want to remove. If you only have a row or two that you need to delete, you can quickly do it with your mouse.

  2. Image titled Delete Empty Rows in Excel Step 2

    2

    Right-click on the row number that you want to delete. You’ll see the entire empty row get selected when you right-click.

    • If you have several blank rows one after the other, click and hold on the first row number, then drag your mouse to the last of the rows you want to delete. Right-click anywhere on the selection.

    Advertisement

  3. Image titled Delete Empty Rows in Excel Step 3

    3

    Select «Delete». The empty row will be deleted, and the rows beneath will move up to fill the empty space. All of your rows beneath with automatically be renumbered.

  4. Advertisement

  1. Image titled Delete Empty Rows in Excel Step 4

    1

    Make a backup of your spreadsheet. When making drastic changes to your spreadsheet, it’s always a good idea to make sure you have a backup that you can quickly restore. Simply copy and paste the spreadsheet file into the same folder to create a quick backup.

  2. Image titled Delete Empty Rows in Excel Step 5

    2

    Add a column to the far-right end of the spreadsheet labeled «Blanks». This method will allow you to quickly filter out your blank rows, ensuring that you don’t accidentally delete rows that contain unseen data. This is especially useful for large spreadsheets.

  3. Image titled Delete Empty Rows in Excel Step 6

    3

    Add the blank counter formula to the first open cell in the new column. Enter the formula =COUNTBLANK(A2:X2). Replace X2 with the last column in the spreadsheet before the «Blanks» column. If the spreadsheet doesn’t start in column A, replace A2 with the starting column. Ensure that the row number matches the start of the spreadsheet’s data.

  4. Image titled Delete Empty Rows in Excel Step 7

    4

    Apply the formula to the entire column. Click and drag the small box in the corner of the cell to apply the formula to the entire Blanks column, or just double-click to apply automatically. Each cell in the column will automatically fill with the number of blanks in that row.

  5. Image titled Delete Empty Rows in Excel Step 8

    5

    Select the entire Blanks column and click «Sort and Filter» → «Filter». You’ll see a little drop-down arrow appear on the header cell.

  6. Image titled Delete Empty Rows in Excel Step 9

    6

    Click the drop-down arrow to open the Filter menu. This menu allows you to select how you want to filter the display.

  7. Image titled Delete Empty Rows in Excel Step 10

    7

    Uncheck the «Select All» box. This will deselect all of the different values, which will be selected automatically.

  8. Image titled Delete Empty Rows in Excel Step 11

    8

    Check the box with the value equal to the number of columns in your sheet. Click «OK». Checking this box will only display rows which have blanks in every cell. This will ensure that you do not accidentally delete rows that have valuable data along with some blank cells.

  9. Image titled Delete Empty Rows in Excel Step 12

    9

    Select all of the blank rows. You should only see rows that are only blank cells. Select all of the rows so that they can be deleted.

  10. Image titled Delete Empty Rows in Excel Step 13

    10

    Delete the selected blank rows. After selecting all of the blank rows, right-click on your selection and choose «Delete». The blank rows will be removed from the spreadsheet.

  11. Image titled Delete Empty Rows in Excel Step 14

    11

    Turn off the filter. Click the Filter button on the Blanks row and select «Clear Filter». Your spreadsheet will return, and your blank rows will be gone. All of your other data will be preserved.

    • At this point, you can delete the Blanks column, or you can keep it for future empty row management.[1]
  12. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Thanks for submitting a tip for review!

About This Article

Thanks to all authors for creating a page that has been read 161,041 times.

Is this article up to date?

Removing Blank Rows in Excel

Removing blank rows implies deleting the empty rows of an Excel worksheet. An empty (or blank) row is one that does not contain any data values. Such blank rows can cause errors in the applied formulas and make the excel dataset look unorganized and untidy.

For example, some unwanted data was removed from row 4 of the following excel dataset. This deletion has created a vacuum in the worksheet, suggesting incomplete or missing entries. Hence, it is essential to eliminate such blank rows from the dataset.

Blank rows appear in a worksheet due to different reasons like copying data from another database, importing data from the Internet, receiving data from other team members, and so on. The purpose of deleting blank rows is to deliver clean datasets that are fit for further processing and analysis.

This article discusses the different techniques for removing (deleting) blank rows in Excel.

Table of contents
  • Removing Blank Rows in Excel
  • How to Remove (Delete) Blank Rows in Excel?
    • #1–Manual Deletion of Blank Rows in Excel
    • #2–Deletion of Blank Rows Using the “Go To Special” Window of Excel
    • #3–Deletion of Blank Rows Using Filters in Excel
    • #4–Deletion of Blank Rows Using the COUNT Function of Excel
    • Frequently Asked Questions
    • Recommended Articles

You can download this Delete Blank Rows Excel Template here – Delete Blank Rows Excel Template

The techniques of removing blank rows from an Excel worksheet are listed as follows:

  1. Manual deletion
  2. Deletion using the “go to special” window
  3. Deletion using filters
  4. Deletion using the COUNT functionThe COUNT function in excel counts the number of cells containing numerical values within the given range. It is a statistical function and returns an integer value. The syntax of the COUNT formula is “=COUNT(value 1, [value 2],…)”
    read more

Let us explore these methods one by one with the help of examples.

#1–Manual Deletion of Blank Rows in Excel

This method is quite helpful when the dataset is small. Moreover, it is an easy technique that does not take much time when applied.

Example #1

The following image shows the revenues generated (column B), costs incurred (column C), and profits earned (column D) by an organization for the different months (column A). The negative figures of column D represent losses.

The dataset pertains to the year 2016. Further, there are three blank excel rows in this dataset, which we want to delete using the following methods:

  1. “Delete sheet rows” option of the Home tab
  2. “Delete” option of the context menu
  3. “Ctrl+minus (-)” shortcut

Manually Delete Blank Rows

Step 1: Select the first blank row (row 5) of the dataset. For this, select any cell of row 5 and press the keys “Shift+space” together.

The selection is shown in the succeeding image.

Note: “Shift+space” is the shortcutAn Excel shortcut is a technique of performing a manual task in a quicker way.read more key to select the entire row of the worksheet.

Manually Delete Blank Rows Step 1

Step 2: Once the entire row has been selected, use any of the following methods to remove (delete) the blank Excel row:

Method “a”: From the Home tab, click the drop-down arrow of “delete” from the “cells” group. Next, select “delete sheet rows,” as shown in the following image.

Manually Delete Blank Rows Step 2

Method “b”: Right-click the selected row (row 5) and choose “delete” from the context menu. This is shown in the following image.

Manually Delete Blank Rows Step 2-1

Method “c”: Press the keys “Ctrl+minus (-)” together. Had we selected a cell of row 5 rather than the entire row (in step 1), the “delete” dialog box would have opened. Next, one could have selected “entire row” and clicked “Ok.”

Note: “Ctrl+minus (-)” is the keyboard shortcutAn Excel shortcut is a technique of performing a manual task in a quicker way.read more to delete the selected row or column entirely. For this shortcut to work, it is essential to select the row or column to be deleted in the foremost step.

Manually Delete Blank Rows Step 2-2

Step 3: The selected row (row 5 selected in step 1) is deleted. Consequently, the data of the initial rows 6, 7, and 8 has shifted upwards to rows 5, 6, and 7.

Hence, the vacuum at row 5 of the dataset has been filled up. This is shown in the following image.

Manually Delete Blank Rows Step 2-3

Step 4: Select the next blank row, which is row 8 of the current dataset. Next, press the F4 key to delete this selected row in excel.

The selected row is shown in the following image.

Note: The F4 key repeats the last action performed by the user. In this example, the last action performed was the deletion of the entire row 5.

Manually Delete Blank Rows Step 2-4

In this way, all the blank rows of the given dataset are deleted. Hence, the size of the dataset has been reduced by eliminating unwanted rows.

#2–Deletion of Blank Rows Using the “Go To Special” Window of Excel

This method works well when a large number of rows have to be deleted from the dataset. In this technique, the blank rows are searched prior to being deleted.

Example #2

The following image shows a dataset similar to that of example 1. Notice that this time, the respective years have been added in column B. Moreover, the data for 2017 has also been added in the bottom rows.

We want to delete all the blank excel rows with the help of the “go to special” dialog box.

Delete Blank Rows

The steps to remove the blank rows in excel using the given technique are listed as follows:

  1. Select the entire dataset. Next, press the keys “Ctrl+G” together. The “go to” dialog box opens, as shown in the following image.

    Note: The shortcut “Ctrl+G” opens the “go to” window of Excel.
    Delete Blank Rows Step 1

  2. Click “special,” shown within a red box in the following image. Alternatively, one can press the keys “Alt+S.”

    Delete Blank Rows Step 2

  3. The “go to special” dialog box opens. Choose “blanks” or press the key “K” and click “Ok.” The selection of this option is shown in the following image.

    Note: Another way to access the “go to special” dialog box is to click the “find and select” drop-down from the Home tab. Thereafter, select the option “go to special.”
    Go To Special - Select Blanks

  4. All blanks within the selected region (selected in step 1) are highlighted. This is shown in the following image.

    Delete Blank Rows Step 4

  5. Keep cell A5 selected. This is the first blank cell that was selected by the “go to special” window in the preceding step.

    Press the keys “Ctrl+minus (-)” together. The “delete” box opens, as shown in the following image. From this box, select “entire row” and click “Ok.”

    Delete Blank Rows Step 5

  6. All the blank rows are deleted, as shown in the following image. The data values shift upwards and fill up the blank rows that had existed initially.

    The current dataset consists of 25 rows as against the previous one (shown at the start of this example), which had 32 rows. Hence, this cleaned dataset offers an improved display to the user.

    Manually Delete Blank Rows Step 2-5

#3–Deletion of Blank Rows Using Filters in Excel

In this method, the blank rows are filtered, selected, and deleted.

Example #3

Working on the data of example #2, we want to remove the blank excel rows by filtering them.

The steps for the given task are listed as follows:

Step 1: Select the entire dataset (or the entire worksheet) and add excel filters. For adding filters, click the “sort and filter” drop-down from the “editing” group of the Home tab. Next, choose “filter.”

Alternatively, select “filter” from the “sort and filter” group of the Data tab. The filters have been added to the dataset, as shown in the following image.

Find the Blank Using Filter step 1

Step 2: Click the filter of “month.” Uncheck the “select all” option to deselect all the months. Select “blanks,” as shown in the following image. Next, click “Ok.”

Note: Be careful while selecting the blank cells since these will be deleted in the subsequent steps. Ensure that no data cells are selected.

Find the Blank Using Filter step 2

Step 3: At present, only the blank rows of the dataset are visible. These are shown in the following image.

Find the Blank Using Filter step 3

Step 4: Select all the filtered rows. Ensure that the top row containing the column headers is not selected. Next, press the keys “Alt+semicolon (;)” together. For this, hold the “Alt” key and, at the same time, press the semicolon.

The visible blank cells are selected, as shown in the following image.

Note: “Alt+semicolon (;)” is the shortcut to select only the visible cells of a selection. It ignores the hidden rows and columns of the selection.

Find the Blank Using Filter step 4

Step 5: Once the visible cells are selected, press the keys “Ctrl+minus sign (-)” together. If a warning appears, which asks if the entire sheet row has to be deleted, click “Ok.”

Find the Blank Using Filter step 5

Step 6: All the blank excel rows are deleted from the given dataset. In the filter of “month,” check the “select all” option to view the entire dataset. Clear the filters by clicking the “filter” option (or the “clear” option) from the Home tab or the Data tab.

Hence, the cleaned dataset is shown in the following image. The rows appearing in blue were earlier blank. But, now they have been filled by an upward movement of the data values.

Find the Blank Using Filter step 6

#4–Deletion of Blank Rows Using the COUNT Function of Excel

In this method, the COUNT function is applied to filter and delete blank rows.

Example #4

Working on the data of example #2, we want to remove the blank rows by applying the COUNT excel formula. The rows which return zero (0) as the result of the COUNT formula should be filtered and deleted.

The steps for removing blank rows by applying the COUNT formula are given as follows:

Step 1: Insert a new column (column F) titled “count.” This is shown in the following image.

Find the Blank Using Formula

Step 2: Enter the following COUNT formula in cell F2.

“=COUNT(A2:E2)”

Press the “Enter” key. To obtain the outputs for the entire column F, drag the formula of cell F2 till the last data cell of column F.

The results are shown in the following image. For all the blank rows, the COUNT formula returns zero. For the remaining rows, this formula returns the count of numerical cells.

Note: The COUNT formula counts the number of cells containing numerical values in the given range (like A2:E2). If no numerical values are found in a particular range, the formula returns zero.

Find the Blank Using Formula step 1

Step 3: Add filters to the dataset (refer to step 1 of example #3). Click the filter of the “count” column. Deselect option four (4) and select option zero (0). This is shown in the following image.

Click “Ok” once the required checkbox is selected.

Find the Blank Using Formula step 2

Step 4: The dataset shows those rows for which the COUNT formula has returned zero. Select these filtered rows, which show 0 in column F. Press the keys “Alt+semicolon (;)” to select the visible cells.

The selection is shown in the following image. Next, press the shortcut “Ctrl+minus (-)” to delete these blank rows. If a warning is displayed asking whether the entire row should be deleted, click “Ok.”

Find the Blank Using Formula step 3

Step 5: The blank rows have been deleted. From the filter of the “count” column, check the “select all” option. The cleaned dataset is shown in the following image.

We have not removed the filters though one can remove them if required. The column “count” can also be deleted since it has met the goal of eliminating blank rows from the dataset.

Find the Blank Using Formula step 4

Frequently Asked Questions

1. What does it mean to remove blank rows in Excel?

To remove blank rows implies deleting the empty rows of an exceldataset. These rows are usually not required as their presence makes the dataset look disordered. Moreover, they make navigation within the worksheet difficult.

In Excel, there are several techniques for removing blank rows. This article discusses all these methods with the help of examples. One can follow the technique, which is easy and quick to be applied.

Note: For more details about the different methods, refer to the examples of this article.

2. How to remove the blank rows displayed at the bottom of the Excel worksheet?

It is not possible to delete the blank rows displayed at the bottom of the worksheet. However, hiding such rows is possible. The steps for the same are listed as follows:

a. Select a cell of the first blank row to be hidden.
b. Press the keys “Shift+space” together. This selects the entire row.
c. Press the keys “Ctrl+Shift+down arrow” together. This selects till the last blank row of the current worksheet.
d. Right-click any row number of the selection.
e. Choose “hide” from the context menu.

All the blank rows displayed at the bottom of the worksheet will be hidden. Such hidden rows are present in the worksheet even though they are invisible.

Note: To unhide the hidden blank rows, select the worksheet by pressing the keys “Ctrl+A” together. Right-click the selection and choose “unhide” from the context menu.

3. How to remove blank rows by using a formula in Excel?

The steps to remove blank rows by using an Excel formula are listed as follows:

a. Add a column to the dataset. Label it “helper” as it serves as a helper column. This column should be adjacent to the data columns of the worksheet.
b. Enter the formula “=COUNTBLANK(range)” in the first cell of the helper column. For instance, if the range is A2:D2, type the formula as “=COUNTBLANK(A2:D2).”
c. Press the “Enter” key and drag the formula to the remaining cells of the helper column.
d. Add filters to the dataset by clicking the filter icon in the Home tab (“editing” group) or the Data tab (“sort and filter” group).
e. Deselect the option “select all” from the filter of the helper column. Select the checkbox of the maximum number displayed. Suppose, for the range A2:D2, the maximum output returned by the COUNTBLANK is 4. This implies that all four cells (from A2 to D2) in row 2 are empty.
f. Select the filtered rows, which show the maximum output (like 4) of the COUNTBLANK function. Right-click the selection and choose “delete row” from the context menu.
g. Click “Ok” in the message asking if the entire row is to be deleted.
The blank rows have been eliminated from the dataset. To view the complete dataset (excluding the blank rows), check the option “select all” from the filter of the helper column. One can clear filters and delete the helper column if required.

Note 1: A helper column is a supporting column added to the dataset to simplify calculations.

Note 2: The COUNTBLANK formula counts the number of empty cells within the specified range. In step b, we specified the range as A2:D2. So, the COUNTBLANK counts empty cells in row 2, which begins from cell A2 and ends at cell D2.

Recommended Articles

This has been a guide to removing blank rows in Excel. Here we discuss how to remove (or delete) blank rows in Excel – 1) manually 2) using the “go to special” window 3) using filters 4) using the COUNT formula along with practical examples. You may learn more about Excel from the following articles –

  • Excel Count Rows
  • VBA IsEmpty Function
  • VBA Row Count
  • Find and Replace in Excel

  • You can remove blank rows in Excel by first doing a «Find & Select» of blank rows in the document. 
  • You can then delete them all at once using the «Delete» button on the Home tab.
  • Once rows or cells are deleted in Excel, the data below them will move upwards.

Though having blank rows in an Excel worksheet isn’t necessarily a bad thing, sometimes they’re unnecessary, as they can make a document take up much more space than intended.

Finding and removing blank spaces and rows in Excel is easy and can be done by using the «Find & Select» feature.

Here’s how to delete blank rows in Excel on a Mac or PC.

1. Click the Home tab in the top menu bar of Excel. 

2. Click Find & Select on the right side.

3. Select Go to Special to open the associated dialog box.

The menu that appears when you click "Find & Select" in Excel, with the "Go to Special" option highlighted.

Click «Go to Special» in the menu.

Stefan Ionescu/Insider


4. A pop-up box will appear. Select Blanks, and then hit OK.

The "Go to Special" dialog box in Excel, with the radial button next to "Blanks," and the "OK" button, highlighted.

Tick the radial button next to «Blanks,» and then click «OK.»

Stefan Ionescu/Insider


5. Excel will then highlight all of the blank cells. Before you delete the blank cells, ensure that only the cells that you want to remove are highlighted. If you just want to remove rows and not individual blank cells, you can always select a cell with Control + click on a PC, or  Command + click on a Mac, to deselect it. 

6. Once all the blank rows are highlighted, go to the Home tab and locate the Delete button on the right-hand side. 

Excel on PC, with the “Delete” button highlighted in the Home tab.

Click the “Delete” button in the Home tab.

Stefan Ionescu/Insider


7. Click the down arrow next to the Delete button and select Delete Sheet Rows to remove the blank rows.

The Home tab in Excel, with the down arrow next to the “Delete” button, and the "Delete Sheet Rows” option – in the menu shows up when you click the “Download” button – highlighted.

Click “Delete Sheet Rows.”

Stefan Ionescu/Insider


Понравилась статья? Поделить с друзьями:
  • Delete duplicates from excel
  • Delete does not work in word
  • Delphi word как вставить картинку
  • Delphi word замена всех
  • Delphi word to pdf