English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Is there a formula to extract a word or phrases from a free text string in a cell? for exp, cell A2 contains "the dog jumped over the fence". in cell B2, i would like to extract the word "dog". However, the word dog is not always placed in the same sequence because cell A3 could say "the cat is fatter than the dog" but i still want to extract just the word "dog".

I have tried FIND() but that only works if the word im looking for is in the same place in the text string.

2006-07-28 05:17:44 · 7 answers · asked by Stephen . 1 in Computers & Internet Programming & Design

7 answers

If Column A has all the sentences that contained the word "dog", and cell A1 contains the very first sentence, then your formula would look like this

=MID(A1,FINDB("dog",A1,1),3)

And just copy and paste the formula.

2006-07-28 05:19:02 · answer #1 · answered by HotRod 5 · 5 0

hmmm.. you might have to use in formulas combination... you can try using Search() or find()---- call the result X, with a If(), then when returning the word "dog", use the mid() function using X and Len() of the sentence as the parameter to define....

Not too sure though this is the shortest way to get what you want...

2006-07-28 12:32:50 · answer #2 · answered by Pencil 3 · 0 0

You'll have to nest the search function in a mid statement. Something like:

=mid(A2,search("dog",A2),3)

2006-07-28 12:23:45 · answer #3 · answered by G Money 2 · 0 0

Put "dog" in A1 then in B2, put the following formula...

=MID(A2,SEARCH(A1,A2),LEN(A1))

This is just a more generic formula.

2006-07-28 12:28:40 · answer #4 · answered by CALOi 2 · 0 0

=IF(ISERROR(SEARCH(A1,A2)),"Not found",MID(A2,FINDB(UPPER(A1),UPPER(A2),1),LEN(A1)))

Where Cell A1 is the Search string
Cell A2 is the Text string

2006-07-28 13:04:37 · answer #5 · answered by Achudha 2 · 0 0

you can use mid function provided in excel.

e.g
mid(B2,5,3) will give you dog.

2006-07-28 12:22:15 · answer #6 · answered by avi_iitr 1 · 0 0

dude that makes no sense whatsoever

2006-07-28 12:19:54 · answer #7 · answered by Gerry S 1 · 0 0

fedest.com, questions and answers