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
8
Medium Priority
?
474 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 1000 total points
ID: 35191622
give this a shot

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

-Brandon
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

721 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