Excel中REPLACE函数的语法和用法
时间:2023-08-08 02:09:42
本文介绍Microsoft Excel中REPLACE函数的语法和用法。
REPLACE函数适用于:Excel2003、Excel2007、Excel2010、Excel2013、Excel2016。
函数说明
REPLACE函数的主要作用是替换文本中的字符,即使用其他文本字符串并根据所指定的字符数替换某文本字符串中的部分文本。
函数语法REPLACE(old_text,start_num,num_chars,new_text)
REPLACE(替换其部分字符的文本,替换的 old_text 中字符的位置,替换 old_text 中字符的个数,替换 old_text 中字符的文本)
REPLACE(old_text,start_num,num_chars,new_text)
REPLACE(替换其部分字符的文本,替换的 old_text 中字符的位置,替换 old_text 中字符的个数,替换 old_text 中字符的文本)
参数说明old_text
old_text
1、必填项
2、要替换其部分字符的文本。
start_num
1、必填项
2、要用 new_text 替换的 old_text 中字符的位置。
3、start_num从1开始
num_chars
1、必填项
2、希望 REPLACE 使用 new_text 替换 old_text 中字符的个数。
new_text
1、必填项
2、是要用于替换 old_text 中字符的文本。
函数示例
REPLACE函数示例1
=REPLACE("Excel教程",1,5,"Office")
函数返回结果
Office教程
REPLACE函数示例2
=REPLACE("Excel教程",-1,5,"Office")
函数返回结果
#VALUE!
REPLACE函数示例3
=REPLACE("Excel教程",0,5,"Office")
函数返回结果
#VALUE!
REPLACE函数示例4
=REPLACE("Excel教程",1,-5,"Office")
函数返回结果
#VALUE!
REPLACE函数示例5
=REPLACE(A2,5,0,"Office")
函数返回结果
exceOfficel教程
REPLACE函数示例6
=REPLACE(A2,1,15,"Office")
函数返回结果
Office
REPLACE函数示例7
=REPLACE(A2,15,35,"Office教程")
函数返回结果
excel教程Office
以下是Excel中使用REPLACE函数效果截图
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win7提示“由于本机的限制 该操作已被取消”怎么办?
![](https://img.aspxhome.com/file/2023/27/a230576_0s.jpg)
win10系统无法使用定时关机命令怎么办?
![](https://img.aspxhome.com/file/2023/2/46952_0s.jpg)
word怎么连续格式刷
![](https://img.aspxhome.com/file/2023/4/34564_0s.gif)
Win10菜单人脉应用显示ms-resource:AppListName错误怎么办?
![](https://img.aspxhome.com/file/2023/9/51109_0s.jpg)
word替换工具的使用方法介绍
![](https://img.aspxhome.com/file/2023/0/24510_0s.jpg)
怎样解决word无法执行语言识别对话框
利用VBA打印隐藏的excel工作表
让Win10系统字体变好看的方法
![](https://img.aspxhome.com/file/2023/26/a226728_0s.jpg)
在Word中成为打印高手的八条秘技
![](https://img.aspxhome.com/file/2023/3/29833_0s.jpg)
微信状态状态背景图大全 微信状态状态背景图文案趣味汇总
![](https://img.aspxhome.com/file/2023/6/a324475_0s.jpg)
打磨近十年,接近「完美」的 macOS 第三方微博客户端:Maipo
![](https://img.aspxhome.com/file/2023/6/a209166_0s.jpeg)
win10系统如何禁止 Edge浏览器保存信用卡数据
![](https://img.aspxhome.com/file/2023/2/a290211_0s.jpg)
excel怎样按颜色筛选
最新笔记本cpu天梯图2021 2021年最新笔记本CPU天梯图高清完整版
![](https://img.aspxhome.com/file/2023/6/a323391_0s.jpg)
华硕主板U盘启动快捷键是什么?华硕主板怎么设置U盘启动?
![](https://img.aspxhome.com/file/2023/6/a325798_0s.jpg)
怎么重装win11?石大师一键重装win11系统教程
![](https://img.aspxhome.com/file/2023/1/a272085_0s.png)
Excel无法新建工作表+是灰色的怎么办?
![](https://img.aspxhome.com/file/2023/7/a153147_0s.png)
word中怎么设置行号,word行号设置方法
Bandizip设置管理员身份解压教程
![](https://img.aspxhome.com/file/2023/30/a264624_0s.png)
如何重置Windows更新组件?手动重置Windows更新组件教程
![](https://img.aspxhome.com/file/2023/6/a321747_0s.jpg)