Skip to content
PremiumIntermediate

Clean and Import Data

Stop bad entries with drop-down lists and validation rules, clean up exports with Remove Duplicates, Text to Columns, Flash Fill and text formulas, import CSV files without losing zeros or dates, and record a cleanup in Power Query that a refresh repeats.

16 lessons · 62 exercises · 2 h 13 min

Start the course

Next: Create a drop-down list with Data Validation

About this course

Data rarely arrives at work ready to use. Five people type the same category five ways, and a CSV file turns postal codes into plain numbers and dates into the wrong month. The first chapter stops bad entries at the door with drop-down lists, validation rules with input messages and alerts, and custom rules written as formulas that refuse duplicates and wrong prefixes.

The second chapter cleans up what's already there. You'll remove duplicate rows and decide what counts as a copy, split a column with Text to Columns, fill one by example with Flash Fill, rescue numbers stored as text, import CSV files with the right column types, and add up same-shaped reports with Consolidate. A case study then cleans one export from start to finish, in a safe order.

The last chapter records the cleanup in Power Query, so next month's file needs one refresh instead of an hour of edits. You'll load a table, set column types, clean columns as steps, stack and match tables with Append and Merge, and turn a wide report into a list with Unpivot and Group By. You practice on real sheets, in Excel's dialogs and in a practice Power Query editor, and every answer is checked at once.

Lessons

1. Stop bad data at the door

  1. Not started

    Create a drop-down list with Data Validation

    Give a column a drop-down list from a range of cells or from choices typed into the rule, so people pick a valid entry from it, and open the list from the keyboard.

  2. Premium

    Allow only sensible entries with validation rules

    Limit cells to whole numbers, dates between two limits or text of one length, explain the rule with an input message, choose how strict the error alert is, and circle the entries that already break it.

  3. Premium

    Write custom validation rules with formulas

    Turn a TRUE/FALSE test into a Custom validation rule, try it in a helper column first, and refuse wrong prefixes, duplicate entries and dates out of order.

2. Clean up messy data

  1. Not started

    Remove duplicates and choose what counts as a copy

    Delete repeated rows with Data > Remove Duplicates, choose the columns that make two rows copies, and count the copies with COUNTIF before anything goes.

  2. Not started

    Split a column with Text to Columns

    Split one column into several at a delimiter such as a comma or a semicolon, or at fixed positions, and set each new column's format so codes keep their zeros and dates their order.

  3. Not started

    Fill a column by example with Flash Fill

    Type the result you want for the first row, let Flash Fill finish the column from the pattern, add a second example where it guesses wrong, and remember that it fills values that won't update.

  4. Premium

    Fix numbers stored as text and hidden characters

    Spot and count the numbers Excel holds as text, then turn them into real numbers, including amounts that end in a web page's nonbreaking space and amounts written with a decimal comma.

  5. Not started

    Import a CSV file without losing zeros and dates

    Import a CSV or text file with the right delimiter and a type for each column, so postal codes keep their leading zeros, long IDs keep every digit and dates written day first come in as the right day.

  6. Premium

    Combine same-shaped reports with Consolidate

    Add up several reports into one summary with Data > Consolidate, match their rows and columns by label so the order on each sheet doesn't matter, and know when a formula across sheets suits better.

  7. Premium

    Case study: clean a contact export with Excel's tools

    Clean a CRM contact export in a safe order with Excel's tools, planning the steps, tidying the emails in a helper column, removing the repeats by the clean email and splitting the names beside the data.

3. Power Query basics

  1. Premium

    Why Power Query: record a cleanup once, repeat it every month

    Know which jobs Power Query does better than formulas and one-off tools, open the Power Query Editor from a table, and see how Applied Steps records each change for the next refresh.

  2. Premium

    Load data into Power Query and set column types

    Take the lines above the headings out of an imported file, promote the first row to headers, give each column the right type from its icon, and close and load the result.

  3. Premium

    Clean columns as steps in Power Query

    Trim, change the capitals, split a column, replace values and filter out rows in the Power Query Editor, then check, change or delete each step in Applied Steps.

  4. Premium

    Refresh a query to clean next month's data

    Rerun every step of a query on new data with Refresh, point a query at next month's file, and build steps that still work when the data changes.

  5. Premium

    Stack and match tables with Append and Merge

    Stack monthly tables into one with Append Queries, and bring columns over from a second table with Merge Queries and the expand button, Power Query's way of doing a lookup.

  6. Premium

    Turn a wide report into a list with Unpivot, then total it with Group By

    Turn one column per month into rows with Unpivot Other Columns, rename the new columns, and total the list by one column or several with Group By.

ProExcel seal: =PROEXCEL() with a check, every formula checked

Certificate of completion

Finish all 16 lessons and solve all 62 exercises to earn it, then add it to LinkedIn.