How To Remove Blank Rows – The COUNTBLANK Function
BEFORE – AFTER
Before diving into the topic of the day, let’s understand some of the basic terms we will come across.
Blanks are empty spaces. In the excel worksheets, they are cells that no parameter had been entered into.
What are Blank Rows?
Blank Rows are rows without any data. For example in the above data, Row 3, Row 6 and Row 8 are blank rows.
Blank/Empty cells or rows in an Excel worksheet is not uncommon. Sometimes it becomes annoying. Deliberate steps can be taken to remove blank rows.
The question is – why border about blank rows?
We need to get bordered on this because of the following reasons:
1.Removing blank rows makes it easier to import spreadsheets to other applications. For example, to Microsoft Access.
2.It helps maintain accuracy. Most especially when calculating the average value of a group of data.
Today’s tutorial, the focus is:
Removing blank Rows in Excel using the COUNTBLANK Function.
Use the COUNTBLANK function to count the quantity of empty/blank cells in a specific range.
The formula SYNTAX and usage of the COUNTBLANK function
The command use here is: =COUNTBLANK(range)
The range is the most important factor here. This is because it communicates with the computer the part of the worksheet needed to work on.
Ranges can be written for rows as =COUNTBLANK(A1:E1)
This range will read cells in row 1 within columns A to E.
They can also be written for columns as =COUNTBLANK(A1:E1)
This range reads cells in column A within rows 1 to 5
Or for both rows and columns as =COUNTBLANK(A1:E5):
This range reads cells in rows and columns within rows 1 to 5 and column A to E.
Let’s kick it off with a case study and see the magic this command plays.
Study the data above. Remove all blank/empty rows using the COUNTBLANK function with Filter.
Step 1: Copy the above data into a new spreadsheet.
Take note of the Columns and Rows.
Add the ‘Blank’ column to the table.
The role of the blank column is to help us determine if a row is empty or not. (It will look like the picture on top).
Next, in the first cell (F2) of the ‘Blank’ column, type:
Click your Enter Key and see the magic.
If well done, cell F2 will read ‘0’ as shown in the picture.
Copy the formula into the entire column.
To do this, select the cell to copy (F2), then, press the Ctrl + C on the keyboard.
Next, you select the cells you wish to paste the formula (F3 to F11) and press Ctrl + V on the keyboard.
The above pictures will be the outcome.
Well done, now you are half way through.
With this we can see the rows that are completely empty, so we can easily delete them.
Tip: Ctrl + C = Copy,
Ctrl + V = Paste.
Next, we apply a ‘filter’ to the ‘Blanks’ column to remove only rows with the highest value of empty cells. In this case, that should be 5.
On the spreadsheet, to select the ‘Filter’ icon, select ‘Data’ first. This is where Filter Icon located. (See the picture above).
The spreadsheet will look like the picture below, (take note of the down arrows).
Good job, we are almost done.
Next, click on the down arrow in column F.
In the drop-down menu, unclick 5, while ensuring 0,1,2 and 3 remain selected.
Note that the Select All box will have a square box.
Now click OK.
Check out what happens.
The blank/empty rows have been removed. As shown above.
Tip: Select only the rows you want to be represented.
To display data with only complete information, in the filter, select only ‘0’. This selection will help remove all other rows with empty cells. Check this on the picture above.
We have learned how to remove blank rows using the COUNTBLANK with Filter.
- How to do text to column in Excel?
- Top Excel Shortcuts Online
- Error in Excel while You Insert Row or Column
- How to Sort In Pivot Table