我的文字如下:
Your number's up (season 2)
我想将其更改为:
Your Number's Up
但是,我现在使用以下代码获得此信息:
Your Number'S Up
=TRIM(PROPER(IFERROR(LEFT(A6976,FIND("(",A6976)-1),A6976)))
我该如何解决这个问题?
答案 0 :(得分:2)
使用 A1 中的数据,请使用:
=SUBSTITUTE(PROPER(SUBSTITUTE(A1,"'","zzz")),"zzz","'")
修改#1:强>
请删除括号部分,使用:
=MID(SUBSTITUTE(PROPER(SUBSTITUTE(A1,"'","zzz")),"zzz","'"),1,FIND("(",SUBSTITUTE(PROPER(SUBSTITUTE(A1,"'","zzz")),"zzz","'"))-1)
修改#2:强>
看看这是否更好:
=MID(SUBSTITUTE(PROPER(SUBSTITUTE(A1,"'","zzz")),"zzz","'"),1,FIND("(",SUBSTITUTE(PROPER(SUBSTITUTE(A1,"'","zzz")),"zzz","'") & "(")-1)
(诀窍是确保FIND()
功能不会失败。)