+ Reply to Thread
Results 1 to 15 of 15

INDEX MATCH based on part of strings

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    INDEX MATCH based on part of strings

    Hi Excel Expert,

    Am trying to use index match to return value in column B based on matching 2 first chars on the left in column A.

    Col A Col B
    POS Majalt
    POS Minalt
    POS Instinctive
    NB Viral
    NB Sierra
    NB Pierce
    CLM Team1
    CLM Team2
    OS Tr1
    OS Tr2
    HR Tetra
    HR Pentagon
    IT penelope

    Cell C1 : NBA MyFormula : {=INDEX(B:B,MATCH(LEFT(C1,2),"*"&$A:$A&"*",0))} <<== I need to find the match of NB only in range A:A to return the related values in Col B.

    Expected Result:

    NB Viral
    NB Sierra
    NB Pierce


    Other than formula stated above, I've also tried with Isnumber(search), etc but all return errors. Can anyone help, pls?

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: INDEX MATCH based on part of strings

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: INDEX MATCH based on part of strings

    Let's try this

    In D1 type the value that you want to match. In this case, VB.

    Then in C1 and copy down use this ARRAY formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: INDEX MATCH based on part of strings

    Possibly, something like this:
    C1:
    =IFERROR(IF(FIND("NB",A1)=1,A1&" "&B1,""),"")
    drag down
    now this will just find the matches, it will not consolidate them into a short list
    and I am a little bit lazy, so, I do not want to try to re-create your workbook, but once you have this, it is prtty easy to get them into a short list as well
    Edited:
    B1: to C1:
    Last edited by dredwolf; 02-07-2014 at 02:47 AM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  5. #5
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: INDEX MATCH based on part of strings

    If you need to pull the NB as well
    =IFERROR($D$1&" "&INDEX($B$2:$B$14,SMALL(IF(LEFT($A$2:$A$14,2)=$D$1,ROW($B$2:$B$14)-ROW($B$2)+1),ROWS($B$1:B1))),"")
    Confirm COntrol+Shift+Enter, drag down
    Where D1 is your 2 letter serach term
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  6. #6
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH based on part of strings

    Hi Sixthsense,

    Attached is the sample workbook I could came out with to clarify what I want to achieve. I added in another column named Tier to help out the clearer picture. Actually the table with all dept names, teams and Tier acts as a standard reference chart. Particularly, dept NB has 3 sub depts called NBAdmin, NBUnderwriters & NBWorkbasket. But regardless these subdept entry, it should still be able to return the team name based on Tier and recognizing the first 2 letters in front. As for other depts, if the formula only checks the first 2 letters in front, it would still give me the valid output so, I need to ensure that, indexing the team name is based on match criteria on the first 2 letters and Tier.

    Hopefully I clarified sufficiently.

    Thank you in advance.
    Attached Files Attached Files

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: INDEX MATCH based on part of strings

    Do you have all the other repliers in your ignore list...?

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: INDEX MATCH based on part of strings

    In G2 Cell

    =IFERROR(LOOKUP(2,1/((LEFT($A$2:$A$14,2)=LEFT(E2,2))*($C$2:$C$14=F2)),$B$2:$B$14),"")

    Drag it down...

  9. #9
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH based on part of strings

    Hi Fotis1991,

    I've tested your formula. It doesn't hv any error but it only will return if dept name entry is 2 first chars or exact match. e.g. If I enter "PO" or "CL" or "CLM", it will return value accordingly but if I entered "NBA" or NBU", it will return blank.

    But what I need is for it to check the first 2 letters only to match, the following letters considered ignored.

  10. #10
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH based on part of strings

    Quote Originally Posted by Fotis1991 View Post
    Do you have all the other repliers in your ignore list...?
    Hi Fotis1991,

    I don't understand this question. Did I do something wrong? Pls correct me if I do.

  11. #11
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH based on part of strings

    Quote Originally Posted by RobertMika View Post
    If you need to pull the NB as well
    =IFERROR($D$1&" "&INDEX($B$2:$B$14,SMALL(IF(LEFT($A$2:$A$14,2)=$D$1,ROW($B$2:$B$14)-ROW($B$2)+1),ROWS($B$1:B1))),"")
    Confirm COntrol+Shift+Enter, drag down
    Where D1 is your 2 letter serach term
    Hi RobertMika,
    I've tried your formula. However it only returns values when only found the first 2 strings that matches in Col A. Also the value it returns is combined with the Team name. Unfortunately, both are not applicable for my requirements.

  12. #12
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: INDEX MATCH based on part of strings

    I think Sixhtsense solved your problem.

    Dahlia,
    Fotis is correctly refering to other people who help you on this task and you are refering your next post just to Sixhtsense.
    This is frankly speaking in this case little unpolite
    Last edited by RobertMika; 02-07-2014 at 07:22 AM.

  13. #13
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: INDEX MATCH based on part of strings

    Hi Dahlia,

    What Fotis1991 & RobertMika highlighted is true.

    Because first you have to acknowledge their answers (to all who tried to help you) because they have spent some time to solve your problem.

    You know what normally I do, I simply add the user in Ignore List because of non confirming the provided solution and I stop answering further questions of that user.

    So it's good to say thanks and give acknowledgement to all the members about their suggested solution

  14. #14
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH based on part of strings

    Hi, to Fotis1991,RobertMika, Sixthsense & all the helpful experts,

    I apologize for giving the incorrect impression to all. Actually, my intention to reply 1 by 1 is that I'm trying to respond specifically on the help given by the specific replier so that he/she would know which 1 I've tried and the output I got for evbody's reference. Usually I only respond after I manage to try out the suggested solution. And I tried to respond chronologically whereby I responded to the post reply that is just after mine than followed by the rest down below. Since I am not that fast in testing all the suggested solutions parallely and reply all at once, also due to bad internet connection here, my response only be done one at a time. I didn't notice on Fotis1991 reply as I was focusing to test some other formulas plus I need to settle my other work at my workplace right now.

    Above all, I do appreciate the time and solutions given. Those other posts that I didn't or haven't response are those I didn't receive any response at all or asking me to give sample which usually very time consuming to create a mock data as I cannot expose the real data, and I have a challenge to create a mock data which explains better on my case.

    Sorry again and moving forward, I supposed to reply to thread rather than reply to the specific replier.

  15. #15
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: INDEX MATCH based on part of strings

    The formula suggested by Sixthsense works as I need. Tqvm Sixthsense.

+ 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: 1
    Last Post: 01-26-2014, 05:37 PM
  2. Multiple Criteria Index/Match Function in VBA Looking Up Dates/Strings/Numbers
    By nadstradamus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2014, 12:35 PM
  3. [SOLVED] VLOOKUP/ INDEX:MATCH part of string.
    By strud in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2013, 12:04 PM
  4. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  5. Can Index & Match find a paticular part number
    By vane0326 in forum Excel General
    Replies: 0
    Last Post: 02-03-2005, 07:56 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