• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extract Word from a Sentence

zhchow86

New Member
Hi, I am new to Chandoo.org. I am facing a problem and trying to find a solution.

From this sentence: Draft Profitability Statement for July 2020, I want to extract only July. I used MID and FIND function but did not get any suitable results. Is there anyone who can give me a solution?

The formula I used is here:
+MID(A3, FIND(" ",A3)+1, FIND(" ",A3,FIND(" ",A3,FIND(" ",A3)+1))-1-FIND(" ",A3))

I think I am not understanding the formula properly. Again a solution is welcome. Thank you.
 
If you create a helper range or an array constant named 'months' containing a list of months
= LOOKUP(1000, SEARCH(months, String), months)
 
If you want, try without helper column

Extract the last two words from the sentence, regardless of the length of the sentence.
Code:
=MID(A3,FIND(" ",A3,FIND("@",SUBSTITUTE(A3," ","@",LEN(A3)-LEN(SUBSTITUTE(A3," ",""))-1),1))+1,256)
Extract Second Last word from a sentence
Code:
=TRIM(LEFT(RIGHT(SUBSTITUTE(A3," ",REPT(" ",300)),600),300))

secondlast.png
 
Back
Top