删除整个数据列中的前导或尾随空格
问题描述:
如何删除整个列中所有单元格的前导或尾随空格?
How do I remove leading or trailing spaces of all cells in an entire column?
工作表的常规查找和替换
(aka Ctrl + H )对话框无法解决问题。
The worksheet's conventional Find and Replace
(aka Ctrl+H) dialog is not solving the problem.
答
如果您想使用公式, TRIM
功能将完全符合您的要求:
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 |
+----+------------+---------------------+
所以做整列...
1)插入列
2)插入 TRIM
指向正在尝试更正的单元格的函数。
3)在页面上复制公式
4)复制插入的列
5)粘贴为值
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"
应该从那里走...