+ Reply to Thread
Results 1 to 5 of 5

Matching a substring, returning value from matched row but different column

  1. #1
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Matching a substring, returning value from matched row but different column

    Hello,
    I have attached a sample workbook.

    I have input data in columns A:E.
    I have a section for output data in columns K:P.

    I would like a function that searches the string in K, for partial match in A.
    Names in K will always have a prefix of a different length followed by an "_".
    The inputs can be frequently updated (A:E), so the search needs to also take into account the fact that A might have inputs past row 6.
    If the string in K is not found in A, I would like it to match to the "Default" input data.

    Columns should match Left to Right (i.e: L should return B, M should return C, N should return D, O should return E).

    I have tried very basic things using FIND and MATCH, but my excel ability is not this advanced!

    Many Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Matching a substring, returning value from matched row but different column

    Please try at L2
    =INDEX(B$2:B$6,IFNA(MATCH(MID($K2,FIND("_",$K2)+1,20),$A$2:$A$6,),1))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: Matching a substring, returning value from matched row but different column

    Thanks - this does work.
    However, if I add a version_05 into the inputs (row 7) and outputs (K5), I drag the formula down and it is not accounting for the additional row in the inputs list.
    Subsequently, returning the default value.

  4. #4
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: Matching a substring, returning value from matched row but different column

    Could it be it requires indexing?

  5. #5
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: Matching a substring, returning value from matched row but different column

    I solved this by defining formulas to the columns.
    See attached sheet.
    Attached Files Attached Files

+ 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. [SOLVED] Matching two values in same column and returning value from one row
    By rooboyz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-14-2014, 02:16 AM
  2. Replies: 4
    Last Post: 12-23-2013, 08:43 AM
  3. Matching a value to a column, (rounding) and returning offset column value
    By jayinthe813 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-19-2013, 02:42 PM
  4. [SOLVED] Matching a value in a column & then summing a respective cell from a the matched value..
    By Scottie in BKK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2012, 12:40 PM
  5. Replies: 2
    Last Post: 06-29-2012, 07:02 AM
  6. Replies: 3
    Last Post: 01-04-2012, 01:42 AM
  7. Matching dates and returning another column
    By jmoorc in forum Excel General
    Replies: 8
    Last Post: 11-30-2011, 07:49 PM

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