[算表] 撷取空格之间的文字

楼主: aul123 (Forever is not my ever)   2023-07-04 16:06:03
软件:excel
版本:office 365
请问像下列的字串,要怎么撷取XX后两个字串 (XX是固定的)
AABBBCCC XX ABC 12 - $$$$$@#$%@
XYZXYZ XX XYZ 34 (%^&&$$$#)
想要用公式撷取出XX面两个字
变成
ABC 12
XYZ 34
空格的撷取用mid search 脑袋打结了...
作者: freePrester (Prester)   2023-07-04 16:26:00
暴力解…假设资料在 A1=MID(A1,FIND("XX",A1)+2,FIND(" ",A1,FIND(" ",A1,FIND("XX",A1)+3)+1)-FIND("XX",A1)-1)我只会硬来,要简化还有请板上神人
作者: windknife18 (windknife18)   2023-07-04 20:10:00
=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",128)),257,256))

Links booklink

Contact Us: admin [ a t ] ucptt.com