+ Reply to Thread
Results 1 to 7 of 7

How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

  1. #1
    Registered User
    Join Date
    05-19-2019
    Location
    America
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2

    How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    I need a formula to assign tasks into general categories using a table of values. The purpose is so I can calculate how much a client would have spent last year using new per-task pricing (by category) instead of hourly rates (by task). The formula is super close, but it's returning first matches instead of exact matches to the entire cell contents. Several task types share text, so this is problematic.

    I've tried messing with the EXACT function and using delimiters, but I'm not making real progress.

    The formula I'm using now is:

    =INDEX(" "&category&" ",MATCH(TRUE,ISNUMBER(SEARCH(" "&task&" "," "&D2&" ")),0))

    What I'm looking for, for example, is to have the correct category populate out of Column P based on an exact, entire cell match between Column N and Column E.

    In other words, when E exactly and entirely matches a value in N, return the corresponding value from P (located in the same row as N value).

    Any help is much appreciated!

    Data Sample.jpg

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-19-2019
    Location
    America
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2

    Re: How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    Thank you for the response. I was able to get some help on this using VLOOKUP.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    I Think that you are over thinking this.

    =match(E1,N1:N200,0) will return your row number.

    So =index("p:p", match("E1","N1:N200",0),1)


    Untested because I am using my phone.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    Quote Originally Posted by mehmetcik View Post
    I Think that you are over thinking this.

    =match(E1,N1:N200,0) will return your row number.

    So =index("p:p", match("E1","N1:N200",0),1)


    Untested because I am using my phone.
    1. You could eliminate the ,1 at the end, seeing as the INDEX range is a single column...
    =index("p:p", match("E1","N1:N200",0))

    2. Because you are only using the MATCH range N1:N200, you would probably be better off keeping the INDEX range to that same size (in this case it isnt wrong, but could potentially cause problems if a new row was inserted in row 1)

    3. Probably because you typed this on your phone, you have some unwanted "" in there...
    =index(p:p, match(E1,N1:N200,0),1)

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    Thanks Ford.

    I think I will take a break until I get back to my Laptop.

    It is awkward on a phone.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to use INDEX, MATCH, SEARCH to return an exact match for entire cell contents

    Quote Originally Posted by mehmetcik View Post
    ...It is awkward on a phone.
    yup, I tried it a few times - gave up

+ 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] Index/Match with 2 match columns, non-exact match
    By c1t in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-25-2019, 08:23 AM
  2. [SOLVED] Formula to search for exact match and to return specific value in a another cell?
    By Air^Canada in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2018, 09:39 AM
  3. Index Match Search Not Using Exact Match
    By amartin575 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-29-2018, 06:08 PM
  4. Return search item/s from array or list in a cell (exact match)
    By adm.patrikbpl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-16-2017, 09:22 AM
  5. Replies: 3
    Last Post: 06-17-2013, 12:37 PM
  6. [SOLVED] Index & Match returning incorrect value. Arrays fixed and exact match used.
    By SDes in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-07-2012, 08:29 PM
  7. Replies: 2
    Last Post: 07-02-2006, 05:50 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