Extract text from a string in excel

2019-07-25 00:12发布

问题:

I want to extract the Test #. and the description that follows into two different columns side by side. Currently I have one long string. I want to break the string into two sets and extract only the needed information.

I have attached a screenshot to make it more clear. In the past I have used the MID function and FIND to extract text from strings, but since the strings here vary in length and content I'm not sure how to do this.

Thank you in advance!!

回答1:

Formula for cell A9:

= LEFT(A2,FIND(".",A2)-1)

Formula for cell B9:

= MID(A2,FIND(". ",A2)+2,FIND(" .",A2)-FIND(". ",A2)-2)

Drag formulas down as far as necessary.