在excel中用SUBSTITUTE函数清除字符串中的空格
时间:2023-05-31 01:58:13
要清除Excel单元格中字符串所包含的空格,手动逐一清除显得十分繁琐。这时可以用SUBSTITUTE函数来快速清除。SUBSTITUTE函数的作用是用新的文本替换原字符串中指定的文本,其语法为:
SUBSTITUTE(text, old_text, new_text, [instance_num])
其参数为:
text:原字符串
old_text:原字符串中需要替换的文本
new_text:用于替换“old_text”的文本
instance_num:可选参数,用来指定要以“new_text”替换第几次出现的“old_text”。如果指定了该参数,则只有符合条件的“old_text”被替换;否则原字符串中的所有“old_text”都将被替换。
假如原字符串在A1单元格中,
在单元格中输入公式:
=SUBSTITUTE(A1," ",CHAR(10))
即可清除A1单元格中字符串的所有空格,其中“CHAR(10)”中的“10”也可以用“13”、”28“等代替。
标签:单元格,字符串,替换,清除,Excel函数
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
win7 U盘出现乱码提示无法读取源文件并无法删除
2023-06-06 23:50:19
![](https://img.aspxhome.com/file/2023/5/a316621_0s.jpg)
Win10系统打印机显示未指定设备怎么解决?
2023-11-10 17:26:18
![](https://img.aspxhome.com/file/2023/6/a323110_0s.jpg)
Win10四月版17134.137累积性更新补丁kb4284848下载
2022-02-10 14:27:24
![](https://img.aspxhome.com/file/2023/29/a260386_0s.jpg)
U盘重装Win10纯净版系统步骤图解
2023-11-26 21:35:00
![](https://img.aspxhome.com/file/2023/7/a327810_0s.png)
Camtasia Studio不会录制视频怎么办?Camtasia Studio录制视频教程
2022-05-31 22:17:21
![](https://img.aspxhome.com/file/2023/7/a328741_0s.png)
Excel中满足特定条件的查询
2022-08-13 07:40:31
Word怎么输入Z中间加一横
2023-11-02 06:31:17
![](https://img.aspxhome.com/file/2023/3/31693_0s.png)
VCMnet11.exe进程是什么意思
2022-08-17 14:30:19
如何在腾讯文档添加水印?腾讯文档添加水印的方法
2023-08-11 05:34:15
![](https://img.aspxhome.com/file/2023/7/a329838_0s.jpg)
wps表格批量修改的方法
2023-05-25 21:18:33
Mac 自带的 PDF&图片 应用「预览」,到底有多强大
2023-08-08 00:18:03
![](https://img.aspxhome.com/file/2023/4/a212184_0s.jpeg)
Win11自带卸载程序怎么打开?Win11卸载软件在哪里?
2023-05-04 00:58:23
![](https://img.aspxhome.com/file/2023/2/a284092_0s.jpg)
Word怎么点击标题跳转到相应的位置
2022-02-04 18:38:31
![](https://img.aspxhome.com/file/2023/2/31972_0s.png)
Bootsqm.dat是什么文件?电脑Bootsqm.dat文件介绍
2022-06-17 20:43:21
![](https://img.aspxhome.com/file/2023/1/a273760_0s.jpg)
excel表格设置变大的方法
2022-09-21 21:07:42
win11内存完整性设置有必要开启吗?win11内存完整性是什么?
2023-10-23 03:49:46
![](https://img.aspxhome.com/file/2023/30/a269995_0s.png)
Word2010教程之如何使用导航阅读
2023-04-06 15:59:14
![](https://img.aspxhome.com/file/2023/1/25141_0s.jpg)
如何修复win7启动引导_修复win7启动引导的步骤
2022-11-05 00:22:23
![](https://img.aspxhome.com/file/2023/2/a284710_0s.png)
升级Win10后无法切换账户且应用打不开的解决方法
2022-06-03 09:37:15
![](https://img.aspxhome.com/file/2023/26/a226778_0s.jpg)
Ubuntu系统服务自定义的热键介绍
2022-07-28 17:12:19
![](https://img.aspxhome.com/file/2023/3/a302718_0s.jpg)