Bird
Raised Fist0
Google Sheetsspreadsheet~20 mins

TRIM and CLEAN in Google Sheets - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
TRIM and CLEAN Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
What is the output of this formula?
Given cell A1 contains the text: " Hello World " (with extra spaces, a non-breaking space, and a bell character), what will be the result of =TRIM(CLEAN(A1))?
A"Hello World"
B"Hello World"
C" Hello World "
D"Hello World"
Attempts:
2 left
💡 Hint
Remember CLEAN removes non-printable characters and TRIM removes extra spaces.
❓ Function Choice
intermediate
2:00remaining
Which formula removes only extra spaces but keeps non-printable characters?
You want to remove extra spaces from text in cell B2 but keep any non-printable characters intact. Which formula should you use?
A=TRIM(B2)
B=CLEAN(B2)
C=TRIM(CLEAN(B2))
D=SUBSTITUTE(B2, CHAR(160), "")
Attempts:
2 left
💡 Hint
TRIM removes extra spaces, CLEAN removes non-printable characters.
🎯 Scenario
advanced
2:30remaining
Cleaning imported data with hidden characters
You imported data into Google Sheets and notice some cells have invisible characters causing errors in formulas. Which formula combination best cleans the text by removing both extra spaces and hidden non-printable characters?
A=CLEAN(TRIM(A2))
B=TRIM(CLEAN(A2))
C=SUBSTITUTE(TRIM(A2), CHAR(10), "")
D=TRIM(SUBSTITUTE(A2, CHAR(160), " "))
Attempts:
2 left
💡 Hint
Think about the order: CLEAN first or TRIM first?
📊 Formula Result
advanced
2:00remaining
What is the output of this formula with CHAR(160)?
Cell C3 contains the text: "Data with non-breaking spaces". What is the output of =TRIM(CLEAN(C3))?
A"Data with non-breaking spaces"
B"Datawithnon-breakingspaces"
C"Data with non-breaking spaces"
D"Data with non-breaking spaces"
Attempts:
2 left
💡 Hint
TRIM removes non-breaking spaces (CHAR(160)) as spaces. CLEAN removes non-printable characters but not CHAR(160).
❓ data_analysis
expert
3:00remaining
How many characters remain after cleaning?
Cell D4 contains the text: " ExampleText   " (with spaces, a non-printable character CHAR(3)). After applying =LEN(TRIM(CLEAN(D4))), how many characters will the result have?
A15
B13
C17
D11
Attempts:
2 left
💡 Hint
Count characters after removing non-printable and extra spaces.

Practice

(1/5)
1. What does the TRIM function do in Google Sheets?
easy
A. Removes extra spaces from text, leaving only single spaces between words
B. Removes all letters except numbers from text
C. Converts all text to uppercase
D. Removes all punctuation marks from text

Solution

  1. Step 1: Understand the purpose of TRIM

    The TRIM function is designed to clean up text by removing extra spaces before, after, and between words, leaving only single spaces.
  2. Step 2: Compare options with TRIM's behavior

    Only Removes extra spaces from text, leaving only single spaces between words correctly describes this behavior. Other options describe different text manipulations not done by TRIM.
  3. Final Answer:

    Removes extra spaces from text, leaving only single spaces between words -> Option A
  4. Quick Check:

    TRIM removes extra spaces = Removes extra spaces from text, leaving only single spaces between words [OK]
Hint: TRIM cleans spaces, not characters or case [OK]
Common Mistakes:
  • Thinking TRIM removes punctuation
  • Confusing TRIM with UPPER or LOWER functions
  • Assuming TRIM removes all spaces
2. Which of the following is the correct syntax to remove non-printable characters from cell A1 in Google Sheets?
easy
A. =CLEAN(A1)
B. =STRIP(A1)
C. =REMOVE(A1)
D. =TRIM(A1)

Solution

  1. Step 1: Identify the function for removing non-printable characters

    The CLEAN function removes non-printable characters from text in Google Sheets.
  2. Step 2: Check syntax correctness

    =CLEAN(A1) uses =CLEAN(A1), which is the correct syntax. Other options either use wrong function names or perform different tasks.
  3. Final Answer:

    =CLEAN(A1) -> Option A
  4. Quick Check:

    CLEAN removes non-printable chars = =CLEAN(A1) [OK]
Hint: Use CLEAN to remove invisible characters [OK]
Common Mistakes:
  • Using TRIM to remove non-printable characters
  • Using non-existent functions like REMOVE or STRIP
  • Forgetting parentheses in function calls
3. Given cell A1 contains the text: " Hello World " (with extra spaces and a non-printable character), what will the formula =TRIM(CLEAN(A1)) return?
medium
A. "Hello World"
B. "Hello World"
C. " Hello World "
D. "Hello World"

Solution

  1. Step 1: Apply CLEAN to remove non-printable characters

    CLEAN removes the non-printable character \u0007, so the text becomes " Hello World " with extra spaces.
  2. Step 2: Apply TRIM to remove extra spaces

    TRIM removes leading, trailing, and extra spaces between words, leaving "Hello World" with a single space.
  3. Final Answer:

    "Hello World" -> Option B
  4. Quick Check:

    CLEAN then TRIM cleans text = "Hello World" [OK]
Hint: Use CLEAN first, then TRIM to tidy text [OK]
Common Mistakes:
  • Applying TRIM before CLEAN
  • Expecting non-printable characters to remain
  • Not removing extra spaces properly
4. You have the formula =TRIM(CLEAN(A1)) but it returns the same messy text with extra spaces and strange characters. What is the most likely problem?
medium
A. TRIM removes only leading spaces, not extra spaces inside text
B. The formula syntax is incorrect and causes an error
C. The text in A1 contains Unicode spaces that CLEAN and TRIM do not remove
D. CLEAN removes visible characters instead of non-printable ones

Solution

  1. Step 1: Understand limitations of CLEAN and TRIM

    CLEAN removes non-printable ASCII characters, and TRIM removes normal spaces, but they do not remove special Unicode spaces like non-breaking spaces.
  2. Step 2: Analyze why messy text remains

    If the text contains Unicode spaces, these functions won't remove them, so the text looks messy despite the formula.
  3. Final Answer:

    The text in A1 contains Unicode spaces that CLEAN and TRIM do not remove -> Option C
  4. Quick Check:

    Unicode spaces not removed by CLEAN/TRIM = The text in A1 contains Unicode spaces that CLEAN and TRIM do not remove [OK]
Hint: Check for special spaces if CLEAN+TRIM fails [OK]
Common Mistakes:
  • Assuming CLEAN removes all invisible characters
  • Thinking TRIM removes all spaces inside text
  • Believing formula syntax is wrong without checking data
5. You imported a list of names into Google Sheets. Some names have extra spaces and hidden characters. Which formula combination will best clean the text in cell A2 to prepare it for analysis?
hard
A. =TRIM(A2)
B. =CLEAN(TRIM(A2))
C. =CLEAN(A2)
D. =TRIM(CLEAN(A2))

Solution

  1. Step 1: Understand the roles of CLEAN and TRIM

    CLEAN removes non-printable characters first, which might be hidden inside the text. TRIM then removes extra spaces around and between words.
  2. Step 2: Determine the correct order of functions

    Applying CLEAN first ensures hidden characters are removed before trimming spaces. So, =TRIM(CLEAN(A2)) is best.
  3. Final Answer:

    =TRIM(CLEAN(A2)) -> Option D
  4. Quick Check:

    CLEAN then TRIM cleans text best = =TRIM(CLEAN(A2)) [OK]
Hint: Always CLEAN first, then TRIM for best results [OK]
Common Mistakes:
  • Using only TRIM or only CLEAN
  • Applying TRIM before CLEAN
  • Assuming order of functions does not matter
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard