+ Reply to Thread
Results 1 to 3 of 3

Match substring

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    3

    Match substring

    I have a table that looks like this:

    Transaction Type
    TRANSFERRED FROM VS 123-4567890-1
    REDEMPTION FROM CORE ACCOUNT
    TRANSFER OF ASSETS WR76543210
    TRANSFER OF ASSETS WR81234761
    YOU SOLD CONF:13004NKGOZ 0
    TRANSFERRED FROM VS 456-1246019-1

    and another table that looks like this:

    Key Value
    TRANSFERRED FROM External Flow
    TRANSFER OF ASSETS External Flow
    YOU SOLD Sale

    I'm trying to create a formula that will find the key that is a substring of each transaction (if there is one). So with the formula applied to the type column of the source table it should look like this:

    Transaction Type
    TRANSFERRED FROM VS 123-4567890-1 External Flow
    REDEMPTION FROM CORE ACCOUNT
    TRANSFER OF ASSETS WR76543210 External Flow
    TRANSFER OF ASSETS WR81234761 External Flow
    YOU SOLD CONF:13004NKGOZ 0 Sale
    TRANSFERRED FROM VS 456-1246019-1 External Flow

    Note that you can't just use fuzzy matching (i.e. MATCH with match_type 1) because if none of the the values are a substring of the transaction in question, the type should be blank.

    Any ideas? Strongly prefer a formula rather than a macro, if possible. Thanks!
    Last edited by aaronb1; 08-08-2014 at 09:57 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Match substring

    With your sample data in A1:A7 (and assuming you're using Excel 2007 or later)
    Please Login or Register  to view this content.
    and this list in G1:H4
    Please Login or Register  to view this content.
    This regular formula searches for matched text and returns the corresponding value
    Please Login or Register  to view this content.
    Copy that formula down through B7

    These are the results
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    06-05-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Match substring

    Thanks a lot! Works great.
    Last edited by aaronb1; 08-09-2014 at 12:13 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Search substring within range, report the substring found
    By Brooke1578 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2012, 03:56 PM
  2. [SOLVED] index-match where match needs to find substring
    By Machtyn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-14-2012, 11:33 AM
  3. Search string for substring...return match
    By Gambinus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2012, 03:18 PM
  4. [SOLVED] Extract Substring, then Ignore that Substring, while collecting data from Other substrings
    By Sameki121 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2012, 05:21 PM
  5. Use substring to match record and append suffix
    By retard in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-15-2011, 02:36 AM

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