Excel公式删除单元格中单词之间的空格 [英] Excel formula to remove space between words in a cell
问题描述
我在 excel 文件中有大量数据.
I've a huge data in excel file.
例如:说我有一个像 paulson 这样的词,我必须把它变成 paulson.
For eg: say i've a word like paul son,i've to make it as paulson.
输入:保罗儿子
输出:paulson
.
在某些单元格中,我有像mic-li
这样的数据,当这种类型的词出现时,它不应该替换任何东西,它应该只删除单词之间的空格.
In some cells ,i've data like mic-li
,when this type of words come,it should not replace any thing,it should only remove spaces in between words.
推荐答案
假设数据在B列,在C列写出公式:
Suppose the data is in the B column, write in the C column the formula:
=SUBSTITUTE(B1," ","")
在整个 C 列中复制并粘贴公式.
Copy&Paste the formula in the whole C column.
编辑:使用逗号或分号作为参数分隔符取决于您的区域设置(我必须使用分号).我觉得这很奇怪.感谢@tocallaghan 和@pablete 指出这一点.
edit: using commas or semicolons as parameters separator depends on your regional settings (I have to use the semicolons). This is weird I think. Thanks to @tocallaghan and @pablete for pointing this out.
这篇关于Excel公式删除单元格中单词之间的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!