Title: How to Remove Whitespace From a String in Excel | Small Business - Chron.com
Headings: How to Remove Whitespace From a String in Excel
How to Remove Whitespace From a String in Excel
1
2
3

Content: however, it cannot remove non-breaking spaces – this requires a combination Excel's Substitute and Trim functions. 1
Open your spreadsheet in Excel and locate the cells containing the whitespace that needs to be removed. 2
Use the Trim function to remove whitespace created from normal spaces. The Trim function requires a single reference to operate. For example, entering "=TRIM (A1)" without quotes will strip all but single spaces between words from the string " this is a test " in cell A1, leaving "this is a test". 3
Use the Substitute function to change non-breaking spaces to regular spaces. For example, "=TRIM (SUBSTITUTE (A1,CHAR (160),CHAR (32)))" without the quotes replaces non-breaking spaces (ASCII character 160) in cell "A1" with standard spaces (ASCII character 32) and then trims leading, trailing and repetitive spaces. ‒‒:‒‒
/
‒‒:‒‒
Replay
Skip
Ads by
Read More
References
Microsoft: Top Ten Ways to Clean Your Data
Microsoft: Remove Spaces From the Beginning and End of a Cell
Tips
To remove whitespace in a long list of cells, copy the Trim or Substitute formula by dragging its bottom-right drag bar down the formula column.