+ Reply to Thread
Results 1 to 4 of 4

Function based on Partial Match Range

  1. #1
    Registered User
    Join Date
    11-26-2014
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2010
    Posts
    2

    Function based on Partial Match Range

    I am trying to do a calculation based on a range that needs to be identified via a partial match. I've tried many options, including the following function:
    {=MEDIAN(INDEX($C$2:$C$6,MATCH(CONCATENATE("*",$E2,"*"),$B$2:$B$6,0)))}

    However, this does not give me the correct answer, since it merely takes the first occurance of the match. How can I create a function that will identify a range? I have attached a sample spreadsheet.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Function based on Partial Match Range

    F2:

    =MEDIAN(IF(ISNUMBER(SEARCH(E2,$B$2:$B$6)),$C$2:$C$6,"X"))

    This is an array formula confirmed with Ctrl+Shift+Enter. Then copy downwards.

    Median coerces the False evaluations into 0, so outputs of X are ignored.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Function based on Partial Match Range

    if i get it
    {=MEDIAN($C$2:INDEX($C$2:$C$6,MATCH(CONCATENATE("*",$E2,"*"),$B$2:$B$6,0)))}

  4. #4
    Registered User
    Join Date
    11-26-2014
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2010
    Posts
    2

    Re: Function based on Partial Match Range

    Thank you very much! The formula works like a dream.

+ 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. Replies: 0
    Last Post: 09-21-2013, 09:03 PM
  2. Returning a value based on a cell with a partial match
    By Backroomgeeza in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-16-2013, 04:21 AM
  3. Grouping rows based on partial match
    By bobrob in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-18-2012, 06:11 PM
  4. Replies: 4
    Last Post: 07-20-2012, 04:58 AM
  5. sumif based on partial match
    By gregangelagrace@gmail.com in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2006, 08:20 PM

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