Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

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

Posted on 2011-03-22
Medium Priority
474 Views
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
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
• 3
• 2
• 2
• +1

LVL 6

Expert Comment

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

0

LVL 6

Expert Comment

ID: 35191520
0

LVL 6

Accepted Solution

KnutsonBM earned 1000 total points
ID: 35191622
give this a shot

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

-Brandon
0

LVL 7

Expert Comment

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

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

-Travis
0

Author Comment

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

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

LVL 6

Expert Comment

ID: 35192104

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

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

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.