Excel formula that copies cell content while remov

2019-06-09 02:51发布

I need a formula that will copy A1 to B1 while removing "-text3" (the second dash and the text that follows it. The "text-text-text" format is consistent in column A). The text1, text2 and text3 each represent a variety in inconsistent strings.

A1:  text1-text2-text3
B1:  text1-text2 (-text3 has been removed by the formula)

1条回答
2楼-- · 2019-06-09 03:40

Use:

=LEFT(A1,FIND("}}}",SUBSTITUTE(A1,"-","}}}",2))-1)

enter image description here

查看更多
登录 后发表回答