in Excel need to Find a keyword in a cell and extract it in another cell

in Excel need to Find a keyword in a cell and extract it in another cell if found.
There are multiple keywords, so that would be set in a range.I believe this can only be achieved using VBA, I would need the code to do this.
yvan_valleeAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
KnutsonBMConnect With a Mentor Commented:
give this a shot

=if(countif(A1,"*keyword*")>0,"keyword","")

-Brandon
0
 
FernandoFernandesCommented:
you should try vlookup()...

take a look at Excel's help about this function.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
harr22Commented:
Brandon's should work, here is another method

=IF(SEARCH("keyword",A32),"keyword","")

-Travis
0
 
yvan_valleeAuthor Commented:
VLOOKUP is only fine if the cell in which I check for a keyowrd only contains that keyword. This is not my case, the keyword is part of a string. Using "TRUE" for an approximative match is not helping in this case, at least from the test I just did.
0
 
KnutsonBMCommented:
if you put your keyword in with asterisks on either side it will work, "*keyword*"
0
 
FernandoFernandesCommented:
please see the file attached...

i wasn't able to use a range to determine the keywords... so i used the choose function, in order to be able to choose which keyword in the range you want to work with... this is one of the solutions.

the other one is more simple, but uses multiple columns...
Book1.xlsx
0
 
yvan_valleeAuthor Commented:
This solution works fine , the other proposed solution (below this one)is displaying a "#VALUE!" if it can't find the keyword. This one puts a blank which is preferable.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.