Solved

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

Posted on 2011-03-22
8
439 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
  • 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
 
LVL 7

Expert Comment

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

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

-Travis
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now