How to Clean Extra Spaces in Google Sheets (4 Easy Methods) (Khmer)

Learn 4 easy methods to remove extra spaces, leading spaces, and hidden characters in Google Sheets using Trim whitespace tool, TRIM, REGEXREPLACE, and CLEAN.

Advertisement

Hello everyone! Today I show you 4 easy methods to clean extra spaces (remove leading, trailing, and double spaces) in Google Sheets step by step with video tutorial in Khmer language.

Messy extra spaces cause formula errors like VLOOKUP not finding matches. Here are 4 fast ways to clean up your data in seconds!

Method 1: Built-in "Trim Whitespace" Tool (No Formula)

This is fastest built-in tool when you don't want to use any formula.

Step by Step:

  1. Select cell range containing messy text (e.g. A2:A100).
  2. Click Data menu on top bar.
  3. Hover over Data cleanup ➔ click Trim whitespace.
  4. Google Sheets cleans all leading, trailing, and double spaces in place instantly!

Method 2: Use TRIM() Formula (Standard Space Cleanup)

If you want formula to clean text dynamically:

=TRIM(A2)
  • What it does: Removes all spaces at beginning and end of text, and converts multiple middle spaces into single space.
  • Example: " Sophea Chan "Sophea Chan

Method 3: Remove ALL Spaces Completely (REGEXREPLACE or SUBSTITUTE)

If you want to delete ALL spaces completely (for phone numbers, bank accounts, or SKU codes):

Option A: Using SUBSTITUTE Formula

=SUBSTITUTE(A2, " ", "")

Option B: Using REGEXREPLACE Formula

=REGEXREPLACE(A2, "\s+", "")
  • Example: 012 99 88 77012998877
Advertisement

Method 4: Combine TRIM + CLEAN (Remove Hidden Line Breaks)

When data copied from website or PDF has hidden line breaks or weird characters, standard TRIM might not clean everything.

Combine TRIM with CLEAN:

=TRIM(CLEAN(A2))
  • CLEAN(): Removes non-printable characters and line breaks.
  • TRIM(): Removes extra white spaces.

📹 Watch Khmer Video Tutorial

Watch video step by step below to see 4 methods to clean extra spaces in Google Sheets:

💡 Quick Tip:

  • Data Cleanup Suggestions: Google Sheets has smart auto-detector! Click DataData cleanupCleanup suggestions. It scans your entire sheet and shows list of messy spaces and duplicate rows to fix with 1-click!
  • Stubborn Web Space (CHAR 160): If TRIM cannot delete a space copied from website, it is non-breaking web space! Use: =TRIM(SUBSTITUTE(A2, CHAR(160), " ")).
  • Clean Whole Column at Once: Use ARRAYFORMULA so formula applies to entire column: =ARRAYFORMULA(TRIM(A2:A100)).

📚 Related Resources

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement