我有一组文本格式的数据。

假设数据在列A中,将以下公式粘贴到B1中,并向下填充:

=REPLACE(REPLACE(A1,FIND("03 ",A1),2," 003 "),FIND("02 ",REPLACE(A1,FIND("03 ",A1),2," 003 "),2," 002 ")

如果0203是连续的,您也可以使用:

=REPLACE(A1,FIND("0203 ",A1),4," 002003 ")