+ Reply to Thread
Results 1 to 4 of 4

Simplification of text strings using common terms

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Danvers, MA
    MS-Off Ver
    Excel Mac 2011
    Posts
    2

    Simplification of text strings using common terms

    I've got a very large data set where some of the columns contain sets of phrases or sentences such as "Peripheral-membrane protein. Single-pass membrane protein." What I am trying to do, and failing quite spectacularly, is simplify the data in each cell of the column by comparing the text in the text-heavy cells on the main worksheet with a simple list of keywords on another worksheet. More specifically, the keyword worksheet has two columns, a list of "look up" words (i.e. peripheral-membrane) and a list of "output" words (i.e. membrane protein). My hope is to create a formula that can compare the "look up" words to my text strings in the main data set and return the "output" word in to the adjacent cell. The bottom line is that I need to try to consolidate all of the phrases in the text-heavy cells to be able to better analyze the information contained within. I hope I've described this clearly.

    Any help will be greatly appreciated - I've been learning so much about Excel from all these forums and decided this was the place to come and ask this question. Thanks in advance.

    Cheers,

    WC
    Attached Files Attached Files
    Last edited by Why Chromosome; 05-14-2013 at 08:10 PM. Reason: Added sample file

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Simplification of text strings using common terms

    put this in D2 of Main Worksheet and drag-fill down:

    Please Login or Register  to view this content.
    UPDATE:

    2^20 is just some LARGE number; SEARCH attempts to find a string in another string and returns the corresponding location_number (in the above construct, it returns an array of location_numbers). 2^20 should be larger than that location_number, typically people use 99^99 or 1E307 (which is 10 to the power of 307).
    Last edited by icestationzbra; 05-14-2013 at 08:58 PM. Reason: add'l info
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  3. #3
    Registered User
    Join Date
    05-14-2013
    Location
    Danvers, MA
    MS-Off Ver
    Excel Mac 2011
    Posts
    2

    Re: Simplification of text strings using common terms

    Well that seemed simple enough (and it worked). Thank you. I'm going to work under the assumption that the formula returns a result based on the first "look up" word it finds, which is fine for my current needs.

    Out of morbid curiosity, what is the purpose of the 2^20 modifier at the head of the LOOKUP function?

    Thanks again.

    WC

  4. #4
    Registered User
    Join Date
    05-29-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Simplification of text strings using common terms

    same thread but an extension of the question:
    the provided formula only returns the 1st instance of a key word, albeit based on an ascending priority order. What about if you want to display all possible matches? so in the example text of "Secreted Cell membrane; Multi-pass membrane protein. " should return keywords matches against "secreted" and multi-pass"

    perhaps this gets into the realm of vba.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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