+ Reply to Thread
Results 1 to 9 of 9

Using Index & Match (or similar) to check two columns for a match

  1. #1
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Using Index & Match (or similar) to check two columns for a match

    Hi

    I'm cross matching a set of data which has people's names in it. Unfortunately, the format of the names that will be imported is inconsistent and could be in the 'Firstname Surname' format or the 'Surname, Firstname' format. Whilst I can easily change these around, I need the end user to be able to copy the names in either format. I've stored the names in both formats in the main section but I need a formula which will check two columns instead of one for a match. Only one of the columns will have a match so it's a case of 'OR' rather than match both. I've been trying various options for the last few evenings but I just can't get it to work.

    I've attached an example with a formula that checks one column. I just need to expand this to check two columns please. Any help would be appreciated.

    Thanks

    D

  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,929

    Re: Using Index & Match (or similar) to check two columns for a match

    I think you forgot to attach the file? (been there, done that)

    I think what you need though, is something like this...
    =INDEX(column-you-want-returned,IFERROR(MATCH(name,1st-culumn,0),MATCH(name,2nd-column,0)))
    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
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Using Index & Match (or similar) to check two columns for a match

    Thanks for quick response. I wasn't able to response earlier because the ExcelForum look to be down but I was able to see your solution in my email and it worked perfectly. Thank you.

    Do you know how I might add an extra criteria in? As above but must meet criteria in 1st column and then meet criteria in either 2nd or 3rd column.

  4. #4
    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,929

    Re: Using Index & Match (or similar) to check two columns for a match

    I think I will need to see a sample of what you are working with, for that (thanks for the feedback, too)

  5. #5
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Using Index & Match (or similar) to check two columns for a match

    Hopefully file attached this time. Example in column C shows it matching two criteria. I needed it to match 1 criteria plus one of 2 other criteria if possible (similar to the example you did for me but adding an additional criteria which must be matched).

    ExcelForum - Or Match2.xlsx

  6. #6
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Using Index & Match (or similar) to check two columns for a match

    Any ideas?

  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,929

    Re: Using Index & Match (or similar) to check two columns for a match

    Sorry for the delay in replying.

    1st I would avoid using full-column references when using ARRAY formulas, they will start to slow your file down.

    try this ARRAY formula...
    =INDEX($H$2:$H$200,MATCH(1,($G$2:$G$200=C$1)*(IFERROR($F$2:$F$200=A2,$F$2:$F$200=B2)),0))

  8. #8
    Registered User
    Join Date
    09-29-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Using Index & Match (or similar) to check two columns for a match

    Thanks for this. Works a treat.

  9. #9
    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,929

    Re: Using Index & Match (or similar) to check two columns for a match

    Happy to help

+ 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. VLookup/Index,Match for Similar values
    By hpatel517 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-21-2015, 06:35 AM
  2. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  3. [SOLVED] Index Match Vlookup Array or Similar
    By djm601 in forum Excel General
    Replies: 3
    Last Post: 10-27-2014, 04:39 PM
  4. Index/Match but the second match criteria >0 regarding 3 columns
    By Ben2487 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-29-2014, 12:08 PM
  5. Index Match Match with rank check
    By Jonathan9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2014, 11:46 AM
  6. [SOLVED] Match Issue - Consolidate Columns of Data With Match/Index/etc?
    By excelsior123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 05:14 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