How to Remove Blank Lines in Excel (7 Methods)

In our dataset we have data of different members of a club. Our dataset contains several blank lines. We will delete these empty rows by using 7 different methods.

Sample Dataset to Remove Blank Lines in Excel


Method 1 – Manually Remove Blank Lines:

This method is straightforward but best suited for small datasets.

Steps:

  • Select the blank lines by holding down the Ctrl key.

Manually Choosing Cells to Remove Blank Lines in Excel

  • Right-click and choose Delete from the available options.

Choosing Delete Option

  • In the Delete prompt, select Shift cells up and click OK.

Deleting by Shifting Cells Up

  • Your dataset will now be free of blank lines.

Manually Remove Blank Lines in Excel

Read More: How to Delete Blank Cells and Shift Data Up in Excel


Method 2 – Applying Keyboard Shortcut:

Although manual, this method is faster than the previous one.

Steps:

  • Select the blank lines.
  • Press Ctrl + Minus ().

Using Keyboard Short Cut to Remove Blank Lines in Excel

  • Choose Shift cells up from the Delete prompt and click OK.

Shifting Cells Up to Remove Blank Lines in Excel

  • Excel will remove the blank lines.

Applying Keyboard Shortcut


Method 3 – Using Go To Special Command

Steps:

  • Select the cell range (e.g., B4:E18).
  • Go to Home > Editing > Find & Select > Go To Special.

Choosing Go To Special Command

  • In the prompt, choose Blanks and click OK.

Selecting Blanks Option to Remove Blank Lines in Excel

  • All blank cells within the dataset will be highlighted.

Highlight Blank Cells

  • Right-click on the blank rows or lines and choose Delete.

Selecting Delete Option

  • Select Shift cells up and click OK.

Shifting Cells Up to Delete

  • Blank lines will be deleted.

Using Go To Special Command to Remove Blank Lines in Excel

Read More: How to Remove Blank Cells from a Range in Excel


Method 4 – Utilizing Find Command:

Steps:

  • Select the cell range (e.g., B4:E18).
  • Go to Home > Editing > Find & Select > Find.

Choosing Find Command to Remove Blank Lines in Excel

  • In the prompt, leave the Find what box blank.
  • Check the Match entire cell contents box.
  • Click Find All.

Finding Blank Cells

  • A list of all blank cells will appear.
  • Choose the blank lines from the list and click Close.

Choosing Blank Lines

  • Blank lines will be highlighted.

Highlighting Blank Lines to Remove Blank Lines in Excel

Utilizing Find Command to Remove Blank Lines in Excel


Method 5 – Implementing Sort Command:

Steps:

  • Select the cell range B4:E18.
  • Go to Home >> Editing >> Sort & Filter >> Sort A to Z.

Choosing Sort Command

  • This will sort the dataset, separating blank lines from non-blank ones.

Selecting Sorted Blank Lines

  • Finally, delete the blank lines as described in the previous method to obtain a dataset without blank lines.

Implementing Sort Command to Remove Blank Lines in Excel


Method 6 – Utilizing Filter Command

Steps:

  • Choose the B4:E18 cell range.
  • Go to Data >> Sort & Filter >> Filter.
  • All column headers will now have a filter handle.

Selecting Filter Command to Remove Blank Lines in Excel

  • Click any filter handle and select the (Blanks) box.
  • Press OK to filter out all blank cells.

Selecting Filter Handle

Filtering Out Blank Lines to Remove Blank Lines in Excel

  • Click the filter handle again, mark the Select All box, and click OK.

Filtering Non-Blank Values

  • Your dataset will be free of blank lines.

Utilizing Filter Command to Remove Blank Lines in Excel

Read More: How to Remove Blank Cells in Excel


Method 7 – Applying FILTER Function

Steps:

  • Click on cell B20 and type:
=FILTER(B5:E18,B5:B18<>"")
  • Press Enter.
  • You’ll get a dataset without blank lines.

Applying FILTER Function to Remove Blank Lines in Excel


Download Practice Workbook

You can download the practice workbook from here:


 

Related Articles


<< Go Back to Remove Blank CellsBlank Cells | Excel Cells | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Prantick Bala
Prantick Bala

PRANTICK BALA is a marine engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in Rhino3D, Maxsurf, C++, MS Office, AutoCAD, Excel, and VBA and goes beyond the basics. Armed with a B.Sc in Naval Architecture & Marine Engineering from BUET, he has transitioned into the role of a content developer. Beyond his work, find him immersed in books, exploring new... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo