将1-1-102转成:1号楼2单元101室 将1-1-2-101转成:1号院1号楼2单元101室

2024-12-15 17:55:26
推荐回答(1个)
回答1:

是excel吗
在另外一列,用此公式
=IF(LEN(A3)-LEN(SUBSTITUTE(A3,"-",))=3,SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A3,"-","号院",1),"-","号楼",1),"-","单元",1)&"室",SUBSTITUTE(SUBSTITUTE(A3,"-","号楼",1),"-","单元",1))&"室"