標題:
[發問]
字串中取字元
[打印本頁]
作者:
mhl9mhl9
時間:
2013-8-4 04:33
標題:
字串中取字元
我希望刪除字串中的字串"2D",字串"3D",刪除所有空格,刪除所有小刮號( "(" 和")")以及小刮號里的字串,其他標點符號用"*"取代
如: "3d 一百:萬.3 (中文 )">>>>>>"一百*萬*"
用function或sub都可以,有可能做到嗎?
作者:
lukychien
時間:
2013-8-15 22:46
回復
1#
mhl9mhl9
我只有想到 SUBSTITUTE , REPLACE ...
作者:
jakcy1234
時間:
2013-8-29 00:33
回復
1#
mhl9mhl9
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1," ",""),"3",""),".","*"),"d",""),":","*")
循環用 = =!
如要再加 將A1字 加插===>> SUBSTITUTE(A1,"y","") SUBSTITUTE(A1,"z","") SUBSTITUTE(A1,"(","*") SUBSTITUTE(A1,")","*")
作者:
jakcy1234
時間:
2013-8-29 01:38
" 3d 一百:萬.3 (中文 ) 一千七百:萬 "
" 一百*萬*一千七百*萬 "
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(A1,1,FIND("(",A1,1))&RIGHT(A1,LEN(A1)-FIND(")",A1,1)),"(","")," ",""),"3",""),".","*"),"d",""),":","*")
================================================
補充少少 刪除所有小刮號( "(" 和")")以及小刮號里的字串 ( 公式如下
MID(A1,1,FIND("(",A1,1))&RIGHT(A1,LEN(A1)-FIND(")",A1,1))
================================================
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)