THE FUTURE MARKETACADEMY
Your classroomRoom 07 · Tech Lab
School of Data & Tech

Excel for Analysis: PivotTables, lookups and data cleaning

What you'll be able to do
  • Clean messy exports: extra spaces, numbers and dates stored as text, and codes that hide several facts in one cell.
  • Split, join and rebuild text with LEFT, MID, FIND, TEXTBEFORE, TEXTAFTER, TEXTSPLIT and TEXTJOIN.
  • Work with dates: build them, find month ends, count working days and group them in a PivotTable.
  • Look things up in more than one way: XLOOKUP that returns several columns, INDEX and MATCH, XMATCH and two-way lookups.
  • Pull lists and answers with the dynamic array functions UNIQUE, SORT and FILTER.
  • Answer business questions with PivotTables (grouping, percentages, running totals, calculated fields) and build a checked one-page report from raw data.

Before this course: Excel for Jobs: From Zero to Confident (course 7.1). You should already know tables, SUMIFS, basic XLOOKUP, data validation, a first PivotTable and slicers. If those are new, take 7.1 first. This course does not repeat them: it goes deeper into messy data, lookups and analysis.

A note on versions: some functions here (TEXTSPLIT, TEXTBEFORE, TEXTAFTER) need Excel for Microsoft 365 or Excel 2024. UNIQUE, SORT, FILTER, XMATCH and XLOOKUP need Microsoft 365, Excel 2021 or Excel 2024. TEXTJOIN also works in Excel 2019. Each lesson says which version you need and gives an older option where there is one.

Words in this course 31Open the Vocabulary Hall
01

Inspect and clean a messy export

In simple words

When you get a box of mixed LEGO from a friend, you do not start building at once. You tip it out, look at it, and pick out the broken or dusty pieces first. A messy spreadsheet is the same: look first, clean second, analyse last.

Key facts
  • Always keep the raw data sheet untouched. Do your cleaning in new columns or on a copy, so you can start over.
  • Look for four common problems: extra spaces, odd capital letters, numbers stored as text (they often sit on the left of the cell and SUM ignores them) and dates stored as text.
  • TRIM(text) removes all spaces from text except single spaces between words. It only removes the normal space (character 32), not the non-breaking space (character 160) that often comes with web pages.
  • SUBSTITUTE(text, old_text, new_text, [instance_num]) replaces specific text. To remove non-breaking spaces use SUBSTITUTE(A2,CHAR(160)," "), then TRIM the result.
  • CLEAN(text) removes the non-printable characters with codes 0 to 31. It does not remove every odd Unicode character.
  • PROPER(text) makes the first letter of each word a capital.
  • VALUE(text) turns text that looks like a number into a real number. =VALUE("$1,000") gives 1000. Text must be in a number, date or time format Excel recognises, or you get #VALUE!.
  • DATEVALUE(date_text) turns text that looks like a date into a date serial number. Excel stores dates as serial numbers, so format the result cell as a date to read it. =DATEVALUE("2011/02/23") gives 40597.
  • Dates typed like 05/03/2026 can be read as 5 March or 3 May depending on your computer's regional settings, so check a few rows after converting.
Example (cleaning one row)
CellContentFormulaResult
A2 ana lopez (extra spaces)=PROPER(TRIM(A2))Ana Lopez
A3Ana + non-breaking space + Lopez=TRIM(SUBSTITUTE(A3,CHAR(160)," "))Ana Lopez
B2$1,250.00 as text=VALUE(B2)1250
C22026/03/05 as text=DATEVALUE(C2)46086 (format it as a date to see 2026-03-05)
Step by step
  1. Copy the raw sheet and name the copy Clean. Never overwrite the raw sheet.
  2. Check each column: left-aligned numbers and green warning triangles often mean numbers stored as text.
  3. Next to the name column write =PROPER(TRIM(SUBSTITUTE(A2,CHAR(160)," "))) and fill it down.
  4. Next to the amount column write =VALUE(B2). Next to the date column write =DATEVALUE(C2), then format the result column as a date (Home > Number Format).
  5. Copy the new columns and use Paste Special > Values over themselves, so the results no longer depend on the raw text.
  6. Delete the old messy columns on the Clean sheet only.
  7. Check: =SUM( of the new amount column matches a total you can see in the source system, and a few converted dates are the right day and month.
Watch on YouTube
How to clean data in Excel: TRIM, CLEAN, PROPER and SUBSTITUTEKnowHow · YouTube · youtube.com

Videos by other creators on YouTube, for reference. They are not made by or affiliated with The Future Market.

LESSON 01Inspect and clean a messy export
LESSON 01 / ANIMATED LESSON / AI VOICE00:00 / 01:00
Read the video script
[Host] "Nobody hands you clean data at work. Today you learn to clean it without breaking the original."
[Screen: raw sheet with ana lopez, extra spaces and amounts on the left side of cells] "Look first. Extra spaces. Numbers on the left. Those are numbers stored as text."
[Screen: typing =PROPER(TRIM(A2)) and filling down] "TRIM removes extra spaces, PROPER fixes the capitals. If it still looks wrong, it may be a non-breaking space, so wrap it in SUBSTITUTE with CHAR 160."
[Screen: =VALUE(B2) then Paste Special > Values] "VALUE turns text into a real number. Paste as values, and keep the raw sheet safe."
Try it now

Make a raw sheet of 10 rows with names that have extra spaces and mixed capitals, amounts typed as text with a dollar sign and comma (for example $1,250.00), and dates typed as 2026/03/05. On a copy, clean every column with TRIM, PROPER, VALUE and DATEVALUE, then paste as values.

ClaudeStuck? Copy a ready-made prompt for Claude

Copy this, open Claude, paste it, and Claude will walk you through the lesson step by step.

For a grown-up: Claude is for adults (18+). Copy this, paste it into Claude, and use the answer to explain the lesson to your child.

I'm learning "Excel for Analysis: PivotTables, lookups and data cleaning" on The Future Market. Lesson 1: "Inspect and clean a messy export".

What the lesson teaches:
- Always keep the raw data sheet untouched. Do your cleaning in new columns or on a copy, so you can start over.
- Look for four common problems: extra spaces, odd capital letters, numbers stored as text (they often sit on the left of the cell and SUM ignores them) and dates stored as text.
- TRIM(text) removes all spaces from text except single spaces between words. It only removes the normal space (character 32), not the non-breaking space (character 160) that often comes with web pages.
- SUBSTITUTE(text, old_text, new_text, [instance_num]) replaces specific text. To remove non-breaking spaces use SUBSTITUTE(A2,CHAR(160)," "), then TRIM the result.
- CLEAN(text) removes the non-printable characters with codes 0 to 31. It does not remove every odd Unicode character.
- PROPER(text) makes the first letter of each word a capital.
- VALUE(text) turns text that looks like a number into a real number. =VALUE("$1,000") gives 1000. Text must be in a number, date or time format Excel recognises, or you get #VALUE!.

The exercise I'm working on:
Make a raw sheet of 10 rows with names that have extra spaces and mixed capitals, amounts typed as text with a dollar sign and comma (for example $1,250.00), and dates typed as 2026/03/05. On a copy, clean every column with TRIM, PROPER, VALUE and DATEVALUE, then paste as values.

I'm stuck. Please:
1. Explain the main idea in plain, simple words with one everyday example.
2. Walk me through the exercise one small step at a time. Ask me what I've done so far before giving the next step.
3. Don't just give me the final answer. Help me do it myself, and check my work when I share it.
I'm a parent helping my child (about 8 years old) with a lesson called "Inspect and clean a messy export" from the course "Excel for Analysis: PivotTables, lookups and data cleaning".

Here's what the lesson says:
When you get a box of mixed LEGO from a friend, you do not start building at once. You tip it out, look at it, and pick out the broken or dusty pieces first. A messy spreadsheet is the same: look first, clean second, analyse last.

The activity:
Make a raw sheet of 10 rows with names that have extra spaces and mixed capitals, amounts typed as text with a dollar sign and comma (for example $1,250.00), and dates typed as 2026/03/05. On a copy, clean every column with TRIM, PROPER, VALUE and DATEVALUE, then paste as values.

Please explain this so an 8-year-old understands: short sentences, a fun everyday example, and no hard words.
Then give me 3 simple questions I can ask my child to check they understood, and a way to do the activity together, one tiny step at a time.
Open Claude
Sources
My notes
02

Pull facts out of text

This lesson is part of full access: every course and every level for one payment.

03

Dates that work for you

This lesson is part of full access: every course and every level for one payment.

04

Lookups beyond the basics

This lesson is part of full access: every course and every level for one payment.

05

Dynamic arrays: UNIQUE, SORT and FILTER

This lesson is part of full access: every course and every level for one payment.

06

PivotTables for real analysis

This lesson is part of full access: every course and every level for one payment.

07

Turn raw data into a one-page report

This lesson is part of full access: every course and every level for one payment.

++

Final project

This lesson is part of full access: every course and every level for one payment.

??

Quiz

  1. Which character does TRIM not remove?

  2. What does VALUE("$1,000") return?

  3. Which function gives the last day of a month, a number of months before or after a date?

  4. How do you get the first day of the month from a date in A2?

  5. Which Excel versions have TEXTSPLIT?

  6. What does a negative instance_num do in TEXTAFTER?

  7. What does MATCH return?

  8. In INDEX and MATCH, which match_type do you use for an exact match?

  9. What does FILTER's third argument, if_empty, do?

  10. What error appears when something blocks a dynamic array's spill range?

  11. Which PivotTable option shows each region as a share of the whole?

  12. How do you prove a PivotTable is right?

EX

Final exam

This lesson is part of full access: every course and every level for one payment.

CE

Certificate

This lesson is part of full access: every course and every level for one payment.