Locked lesson.
About this lesson
The video shows two different ways to get rid of blank lines in a dataset and how to sort data without unique identifiers back into its original order.
Quick reference
Importing data into Excel: get rid of blank lines in your data
Learning how to prepare data for use in Excel - get rid of blank lines in your dataset.
When to use
Blank lines cause Excel to think the dataset ends and results in misselection of a range, formula copying not being effective, and you may end with incorrect calculations or reports about the data without knowing.
Instructions
Getting rid of blank lines
- Deleting blank lines are the final issue to resolve in this sheet
- Excel regards a break in the data as an indication that the dataset has ended
- To get rid of blank lines may be as easy as selecting the line and delete
- If you have a larger dataset, that may become a bit tedious, so here are two methods:
- Sort the data by any of the fields so that the blank lines end up together and delete from there
- Select the data and add an auto filter, filter the blanks, select and delete
Sort
- If you sort and need to get data back in the original order, add a type of unique number in a column and sort with the data
- Select the entire range, on the data tab, sort & filter grouping, click on the sort button
- Remember to tick your “my data has headers” box if you include the headers in the range selection
- After deleting your blank lines, you can use the unique number sequence to sort the data in the original order again
Filter
- Select your data range, be sure to include the whole range (select to include the blank lines)
- On the data tab, sort & filter grouping, click on the auto filter button
- Excel adds auto filter buttons to the headers
- Click on an auto filter button, deselect all options, move to the bottom of the values available and choose blanks
- All the blanks cells should be visible (check the row numbers on the side, if some are blue, then your data is filtered
- Select the lines, delete
- Remove the filter
- Filtering does not change the order of your data like sorting does
Lesson notes are only available for subscribers.