How to Delete a Row If a Cell is Blank in Excel (4 Methods)

While working with a large number of data, you can find numerous blank cells in your dataset. As a result, it can misinterpret your dataset or can give you wrong information. So you may need to delete a row if there are any blank cells. In this tutorial, we are showing you how to delete a row if a cell is blank in excel with suitable examples and proper illustrations.


Download Practice Workbook

Download the following practice workbook and practice along with that.


4 Ways to Delete a Row If Cell is Blank in Excel

Now, you can delete a row manually if you find any blank cell in that row. Though it will be easier, it would be almost impossible if you have tons of data in your worksheet. No wonder we need some easy techniques to handle such situations.
To delete a row after finding a blank cell, the following methods will come in handy for any dataset.

We are going to use the following dataset all through our tutorial:

dataset for excel delete row if cell is blank

Here, our dataset consists of some people’s names, occupations, and ages. Notice that the dataset has some blank cells. Now, our goal is to delete those rows which contain empty cells.

1. Delete a Row If a Cell is Empty Using Go To Special Command in Excel

We use mostly this method on any worksheet. This method is effective and easy to implement.

Steps:

1. First, select the range of cells B5:D11.

select ranges of cells with blanks to delete row

2. Next, press Ctrl+G on your keyboard. You will see the Go To dialog box.

Go to dialog box to delete rows

3. Then, click on Special.

select blanks to delete row in excel

4. Next, select the Blanks radio button. Then, click on OK.

After that, you will see it highlighted all the empty cells.

highlighted blank row to delete in excel

5. Now, Right-click on any of the highlighted blank cells. Click on Delete.

right-click for delete option

6. Now, select the Entire Row radio button.

select entire row radio button

7. Then, click on OK.

new dataset after deleting rows with blank cells

As you can see, we have successfully deleted all rows containing empty cells in them.

Read more: How to Delete Specific Rows in Excel

2. Remove Row If Cell is Blank Using Find and Replace Command

Now, you can use this method too to delete rows. This method basically finds empty cells. After that, you can delete those rows as we did earlier.

Steps:

1. First, select the range of cells B5:D11.

select range of cells to find blank cell

2. Next, press Ctrl+F on your keyboard. After that, you will see a Find and Replace dialog box.

3. Now, leave it empty in the Find What box. Next, click on Options.

find and replace dialog box

4. After that, select Match entire cell contents. Next, select Values from the Look in dropdown menu. Then, click on Find All.

find and replace dialog box to delete blank rows

5. Here, it brings up the lists of all those rows containing blank cells on them.

List of cells containing blank cell

6. Then, press Ctrl+A to select all those rows. It will highlight all those blank cells.

select all the rows to delete

7. Similar to the previous method, right-click on the mouse after that. Click on Delete > Entire row > OK.

click on entire row option

8. After that, it will delete all those rows.

final result after deleting row if cell is blank

In the end, we successfully removed all those rows containing blank cells.

Read more: How to Delete Multiple Rows in Excel

3. Delete Row Using the Filter Command

Now, this method is a bit tricky. Here, we are using a formula to find blank cells and create another column. In that column, we are basically writing whether it is blank or not. Then, by using Excel’s Filter option we will delete those rows. Let’s see the following steps.

Steps:

1. First, create a new column “Cell“.

create new column "Cell"

2. Then, type the following formula in Cell E5:

=IF(COUNTBLANK(B5:D5),"Blank","No Blank")

formula for finding blank cells

3. Then, press Enter. After that, it will show whether the row has blank cells or not.

result after entering the formula

4. Next, drag the Fill Handle icon over the range of cells E6:E11.

drag the fill handle to copy the formula

5. Now, select any cell. Then, go to the Home tab. Click on Filter afterward.

go to data tab for filter option

6. After that, a Drop-down menu will appear.

dropdown menu on each each column

7. Now, click on the dropdown of the Cell column. Deselect all the options. Then, select Blank. Click on OK.

select blank to filter blank row

8. Here, you will see, all the rows that have blank cells in them.

row with blank cell in excel

9. Now, select all the rows.

select all the rows to delete

10. Next, right-click on the mouse. Then, click on Delete Row.

click on delete row

11. After that, it will delete all those rows. Next, click on the drop-down of the Cell column. Then, click on No Blank > OK.

select no blank for non blank row

12. After that, you will see the rows that have no blanks.

row after delete blank cell in excel

As you can see, we have successfully removed all the rows containing blank cells.

Read more: How to Delete Rows in Excel

4. Delete Row If Cell is Blank Using VBA in Excel

Now, if you have knowledge of Excel’s VBA Macros then you should try this method too. This method is also effective and will save you a lot of time. So, without any delay, let’s see the following steps.

Steps:

1. First, press Alt+F11 on your keyboard. It will open VBA Editor. Click on Insert > Module.

Insert VBA module in excel

2. Now, in the editor, type the following code:

Sub RemoveRows()
Dim Rng As Range
Dim WRng As Range
On Error Resume Next
xTitleId = "Delete Rows If Cell is Blank"
Set WRng = Application.Selection
Set WRng = Application.InputBox("range", xTitleId, WRng.Address, Type:=8)
Set WRng = WRng.SpecialCells(xlCellTypeBlanks)
If Err = 0 Then
WRng.EntireRow.Delete
End If
End Sub

3. Then, press Ctrl+S to save.

4. Now, go to the View tab. Click on Macros.

click on Macros in view tab

5. After that, it will open a Macro dialog box. Click on Run.

run VBA code to delete row if cell is blank

6. Then, another dialog box will appear. In the range box, select the range of cells B5:D11. Click on OK.

select range of cells to delete row if cell is blank in excel

7. After that, our macros will delete all the rows with blank cells.

excel delete row if cell is blank

In the end, we are successful in deleting all the rows with blank cells.

Read more: How to Use VBA to Delete Empty Rows in Excel


Conclusion

To conclude, I hope these methods will help you remove rows with blank cells. Learn these methods and practice all of them. Besides, you can download the practice workbook and try these yourself. Also, feel free to give your feedback in the comment section. And don’t forget to check our website Exceldemy.com for more Excel-related articles.


Related Articles

Shanto

Hello! I am Shanto. An Excel & VBA Content Developer. My goal is to provide our readers with great tutorials on various Excel-related problems. I hope our easy but effective tutorials will enrich your knowledge. I have completed my BSc in Computer Science & Engineering from Daffodil International University. Working with data was always my passion. Love to work with data, analyze those, and find patterns. Also, love to research. Always look for challenges to keep me growing.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo