Remove leading or trailing spaces in an entire column of data
Posted By: Anonymous
How do I remove leading or trailing spaces of all cells in an entire column?
The worksheet’s conventional Find and Replace
(aka Ctrl+H) dialog is not solving the problem.
Solution
If you would like to use a formula, the TRIM
function will do exactly what you’re looking for:
+----+------------+---------------------+
| | A | B |
+----+------------+---------------------+
| 1 | =TRIM(B1) | value to trim here |
+----+------------+---------------------+
So to do the whole column…
1) Insert a column
2) Insert TRIM
function pointed at cell you are trying to correct.
3) Copy formula down the page
4) Copy inserted column
5) Paste as “Values”
Should be good to go from there…
Answered By: Anonymous
Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.