Solved

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

Posted on 2011-03-22
8
465 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:yvan_vallee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35191513
you should try vlookup()...

take a look at Excel's help about this function.
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35191520
0
 
LVL 6

Accepted Solution

by:
KnutsonBM earned 250 total points
ID: 35191622
give this a shot

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

-Brandon
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 7

Expert Comment

by:harr22
ID: 35191694
Brandon's should work, here is another method

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

-Travis
0
 

Author Comment

by:yvan_vallee
ID: 35191833
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
 
LVL 6

Expert Comment

by:KnutsonBM
ID: 35191849
if you put your keyword in with asterisks on either side it will work, "*keyword*"
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35192104
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
 

Author Closing Comment

by:yvan_vallee
ID: 35192117
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

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro to convert table into pivot tables 25 71
Lookup range formula 7 27
Excel Auto-Complete lines 4 32
WIthin VBA summing record count in 3 tabs 7 40
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question