在字符串内将文本中的一个单词提取到分隔值的右侧 [英] Extract text one word to the right of delimited value within string
本文介绍了在字符串内将文本中的一个单词提取到分隔值的右侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
^
的右侧提取一个单词(两个空格)。 示例:单元格A2
约翰尼和我正计划去看电影看蝙蝠侠归来,但是到了晚
结果:单元格B2
^蝙蝠侠返回,
解决方案
使用
I've tried numerous formulas and cannot seem to figure it out using the RIGHT, LEFT and MID functions. Using MS Excel, I would like to extract only one word (two spaces) to the right of my delimiter value ^
.
EXAMPLE: Cell A2
Johnny and I were planning on going to the movie to see ^Batman Returns, but it was to late.
Results: Cell B2
^Batman Returns,
解决方案
Expand the spaces with the SUBSTITUTE and REPT functions then chop out a piece with MID and finally clean it up with the TRIM function.
=TRIM(MID(SUBSTITUTE(A2, " ", REPT(" ", 99)), FIND("^", SUBSTITUTE(A2, " ", REPT(" ", 99))), 199))
这篇关于在字符串内将文本中的一个单词提取到分隔值的右侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文