0
0
Excelspreadsheet~10 mins

Why Power Query transforms messy data in Excel - Formula Trace Breakdown

Choose your learning style9 modes available
Sample Data

This data shows a list of people with their names, ages, and cities. The data is messy: names have extra spaces, ages have text instead of numbers, and cities have extra spaces.

CellValue
A1Name
B1Age
C1City
A2 Alice
B2 25
C2New York
A3Bob
B3Thirty
C3Los Angeles
A4Charlie
B440
C4 Chicago
Formula Trace
=TRIM(A2)
Step 1: A2
Step 2: TRIM(" Alice ")
Cell Reference Map
   A       B       C  
1 Name    Age    City 
2 Alice   25     New York
3 Bob     Thirty Los Angeles
4 Charlie 40     Chicago 
The formula references cell A2 which contains the name with extra spaces.
Result
   A       B       C  
1 Name    Age    City 
2 Alice   25     New York
3 Bob     Thirty Los Angeles
4 Charlie 40     Chicago 
After applying TRIM to A2, the extra spaces around 'Alice' are removed, cleaning the data for better use.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the TRIM function do in the formula =TRIM(A2)?
AChanges text to uppercase
BRemoves extra spaces from the text
CConverts text to a number
DAdds spaces around the text
Key Result
TRIM removes extra spaces from text values to clean data.