REPLACE
描述
从 start_num 位置开始,将 old_text 个字符替换为 new_text。
语法
REPLACE(
old_text
, start_num
, num_chars
, new_text
) - old_text:包含要替换字符的文本。
- start_num:要开始替换文本的位置。值必须大于或等于 0。
- num_chars:要替换的字符数。
- new_text:要插入的文本。
示例
公式 | 结果 |
|---|---|
=REPLACE(A1,10,5,"上线环境") 其中,单元格 A1 包含 区域销售经理 。替换从第 10 个字符(Sales 中的字母 S)开始的文本,并替换第 5 个字符(“Sales”一词的替换值)。 | 区域生产经理 |