孟凯 發表於 2020-4-9 00:00:00

(视频)表格文本函数:REPLACE函数 替换新旧字符

<b>视频地址1:</b>点击观看<br><br>
<b>视频地址2:</b>点击观看<br><br>
<b>教程难度:</b>初级<br><br>
<b>图文教程:</b><br>
<p><br></p><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">根据指定的字符数,REPLACE 将部分文本字符串替换为不同的文本字符串。</span></p><p><br></p><p><strong><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">语法</span></strong><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;"><br></span></p><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;"><span style="color: rgb(34, 34, 38); font-family: 微软雅黑, Microsoft YaHei; font-size: 16px; background-color: rgb(255, 255, 255);">■&nbsp;</span>REPLACE(old_text,start_num,num_chars,new_text)</span></p><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;"><span style="color: rgb(34, 34, 38); font-family: 微软雅黑, Microsoft YaHei; font-size: 16px; background-color: rgb(255, 255, 255);">■&nbsp;</span>Old_text&nbsp;&nbsp;&nbsp;&nbsp; 是要替换其部分字符的文本。</span></p><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;"><span style="color: rgb(34, 34, 38); font-family: 微软雅黑, Microsoft YaHei; font-size: 16px; background-color: rgb(255, 255, 255);">■&nbsp;</span>Start_num&nbsp;&nbsp;&nbsp;&nbsp; 是要用 new_text 替换的 old_text 中字符的位置。</span></p><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;"><span style="color: rgb(34, 34, 38); font-family: 微软雅黑, Microsoft YaHei; font-size: 16px; background-color: rgb(255, 255, 255);">■&nbsp;</span>Num_chars&nbsp;&nbsp;&nbsp;&nbsp; 是希望 REPLACE 使用 new_text 替换 old_text 中字符的个数。</span></p><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;"><span style="color: rgb(34, 34, 38); font-family: 微软雅黑, Microsoft YaHei; font-size: 16px; background-color: rgb(255, 255, 255);">■&nbsp;</span>New_text&nbsp;&nbsp;&nbsp;&nbsp;将替换 old_text 中字符的文本。</span></p><p><br></p><section><p><br></p><table id="tblID0EABBAAA" class="banded flipColors" width="768"><thead style="box-sizing: border-box;"><tr style="box-sizing: border-box; vertical-align: top; background-color: rgb(218, 218, 218); border-top: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204); padding: 0px !important;" class="firstRow"><th style="box-sizing: border-box; text-align: left; padding-top: 3px; padding-bottom: 3px; padding-left: 5px; background: rgb(218, 218, 218); border-width: 0px; border-style: initial; border-color: initial; font-size: 1em; color: rgb(51, 51, 51); font-weight: normal;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">公式</span></p></th><th style="box-sizing: border-box; text-align: left; padding-top: 3px; padding-bottom: 3px; padding-left: 5px; background: rgb(218, 218, 218); border-width: 0px; border-style: initial; border-color: initial; font-size: 1em; color: rgb(51, 51, 51); font-weight: normal;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">说明</span></p></th></tr></thead><tbody style="box-sizing: border-box;"><tr style="box-sizing: border-box; vertical-align: top; padding: 0px !important; background-color: rgb(244, 244, 244); border-top: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204);"><td style="box-sizing: border-box; padding-top: 4px; padding-bottom: 4px; margin: 0px; vertical-align: top;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">=REPLACE(abcdefghijk,6,5,*)</span></p></td><td style="box-sizing: border-box; padding-top: 4px; padding-bottom: 4px; margin: 0px; vertical-align: top;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">从第六个字符开始替换五个字符 (abcde*k)</span></p></td></tr><tr style="box-sizing: border-box; vertical-align: top; padding: 0px !important; background-color: rgb(244, 244, 244); border-top: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204);"><td style="box-sizing: border-box; padding-top: 4px; padding-bottom: 4px; margin: 0px; vertical-align: top;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">=REPLACE(2009,3,2,10)</span></p></td><td style="box-sizing: border-box; padding-top: 4px; padding-bottom: 4px; margin: 0px; vertical-align: top;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">将 2009 的最后两位数替换为 10 (2010)</span></p></td></tr><tr style="box-sizing: border-box; vertical-align: top; padding: 0px !important; background-color: rgb(244, 244, 244); border-top: 1px solid rgb(204, 204, 204); border-bottom: 1px solid rgb(204, 204, 204);"><td style="box-sizing: border-box; padding-top: 4px; padding-bottom: 4px; margin: 0px; vertical-align: top;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">=REPLACE(123456,1,3,@)</span></p></td><td style="box-sizing: border-box; padding-top: 4px; padding-bottom: 4px; margin: 0px; vertical-align: top;"><p><span style="font-family: 微软雅黑, Microsoft YaHei; font-size: 16px;">将前三个字符替换为 @ (@456)</span></p></td></tr></tbody></table><section><p><br></p><p><br></p></section></section><p style="box-sizing: border-box; padding: 0px; margin-top: 0px; margin-bottom: 0px; font-family: PingFangSC-Regular; color: rgb(34, 34, 38);"><br style="box-sizing: border-box; padding: 0px; margin: 0px; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);"></p><p><br></p><p><span style="color: rgb(30, 30, 30); font-family: " segoe="" ui="" helvetica="" bbalpha="" s60="" font-size:="" background-color:=""><br></span><br></p>
頁: [1]
查看完整版本: (视频)表格文本函数:REPLACE函数 替换新旧字符