+ Reply to Thread
Results 1 to 4 of 4

Looking for keywords in a cell and returning text based on that keyword in another cell

  1. #1
    Registered User
    Join Date
    11-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Looking for keywords in a cell and returning text based on that keyword in another cell

    Hi

    Pretty sure this has been dealt with before, but cannot find anything in this regard.

    I have hundreds of entries describing rocks in one column containing words that I would like to call keywords. I need to compile a database from these text entries looking for specific keywords and based on these keywords, I need to make an entry in columns adjacent to main entry which will be a code.

    Example (literally). The cell (A1)contains the following text:

    Mottled and spotted anorthosite, strongly altered, sheared and fractured in places, dip~70° @18.19m, minor fractures in places with dip~50°

    In the columns next to this cell entry:
    (B1): I need to have the code "A" based on the keyword "altered"
    (C1): The entry in this cell needs to be "STRONG" based on the keyword "strongly"
    (D1): This entry in cell C1 must be "SH" based on the keyword "sheared"
    and so on.

    As you can see, the amount of data contained in the single entry in cell A1, is limited, but varied. I need to extract the data from approximately 12,000 cell entries in the same column.

    Please help

    Jan

  2. #2
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Looking for keywords in a cell and returning text based on that keyword in another cel

    Hi Jan,
    Welcome to the forum!

    Your formulas would be as follows:

    B1 =IF(ISNUMBER(FIND("altered",A1)),"A","")
    C1 =IF(ISNUMBER(FIND("strong",A1)),"Strong","")
    D1 =IF(ISNUMBER(FIND("shear",A1)),"SH","")

    Don't forget to click on the little star to the left of this post if you feel I helped
    Taming the Excel dragon... www.TheExcelphile.com

  3. #3
    Registered User
    Join Date
    11-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Looking for keywords in a cell and returning text based on that keyword in another cel

    Quote Originally Posted by TheExcelphile View Post
    Hi Jan,
    Welcome to the forum!

    Your formulas would be as follows:

    B1 =IF(ISNUMBER(FIND("altered",A1)),"A","")
    C1 =IF(ISNUMBER(FIND("strong",A1)),"Strong","")
    D1 =IF(ISNUMBER(FIND("shear",A1)),"SH","")

    Don't forget to click on the little star to the left of this post if you feel I helped
    Dear Excelphile

    That worked and helped absolutely brilliantly. Tried it and now I shall write literally tens of these functions to make my work so much easier.

    Brilliant. Thank you so much.

    Regards from sunny South Africa

    Jan

  4. #4
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Looking for keywords in a cell and returning text based on that keyword in another cel

    Glad I could help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1