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.
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:
- Select cell range containing messy text (e.g.
A2:A100). - Click Data menu on top bar.
- Hover over Data cleanup ➔ click Trim whitespace.
- 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 77➔012998877
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 Data ➔ Data cleanup ➔ Cleanup 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
TRIMcannot delete a space copied from website, it is non-breaking web space! Use:=TRIM(SUBSTITUTE(A2, CHAR(160), " ")).- Clean Whole Column at Once: Use
ARRAYFORMULAso formula applies to entire column:=ARRAYFORMULA(TRIM(A2:A100)).
📚 Related Resources
Related Tutorials
Opens in new tab ↗2 Quick Ways to Remove Blank Cells from Your List in Google Sheets (Khmer)
Learn 2 quick ways to remove blank cells and empty rows from your list in Google Sheets using FILTER formula and Filter Tool with Khmer video guide.
How to Count Checked and Unchecked Boxes in Google Sheets (Khmer)
Learn how to count checked and unchecked boxes, calculate percentage %, and build progress bars in Google Sheets step by step with Khmer video guide.
How to Create Dynamic Drop-Down List in Google Sheets (Khmer)
Learn how to create static and dynamic dropdown lists in Google Sheets that automatically update when source data changes with Khmer video guide.