+ Reply to Thread
Results 1 to 6 of 6

Match Function Returning NA and Incorrect Values

  1. #1
    Registered User
    Join Date
    07-29-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    36

    Match Function Returning NA and Incorrect Values

    I am extremely confused with what is going on in this file I was using. I understand the match function tells you the relative position of something in some given range, but the values it is giving me here seem totally wild. I get NAs sometimes when I change the text on the left, and other times I just get the wrong position (sometimes the right position). I am honestly beyond confused at this point as to what could possibly be going on (there is no consistency - I presume there must be something modified about the cells that I am not seeing). Please help, I beg.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-29-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    36

    Re: Match Function Returning NA and Incorrect Values

    Just realised that apparently match has to be used on sorted data? I never knew that was the case. Is there anyway of getting around this (should I try using the sort function)?

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Match Function Returning NA and Incorrect Values

    MATCH() with an omitted 3rd argument has to be used on sorted data. If you put 0 into the 3rd argument, then it will find an exact match and the data do not need to be sorted. =MATCH(A4,$A$4:$A$7,0)

    MATCH() help file: https://support.microsoft.com/en-us/...rs=en-us&ad=us
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

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

    Re: Match Function Returning NA and Incorrect Values

    Thats because you did not add the last argument, which tells excel if you are working with a sorted list (1) to find a approximate match, or an unsorted list (0) to find an exact match.

    A
    B
    C
    3
    Code
    4
    Swam 4
    1
    5
    OPS 2
    2
    6
    Hi #N/A
    3
    7
    PBC03A 4
    4


    Your formula...
    B4=MATCH(A4,$A$4:$A$7)

    My formula...
    C4=MATCH(A4,$A$4:$A$7,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

  5. #5
    Registered User
    Join Date
    07-29-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    36

    Re: Match Function Returning NA and Incorrect Values

    Thank you so much! I think using xlookup so much and not having to worry about exact or non-exact matches has made me lazy. I am surprised that the match defaults the way it does. Thanks again though!!!

  6. #6
    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: Match Function Returning NA and Incorrect Values

    Happy to help and thanks for the feedback

+ 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] Problems with INDEX, MATCH, MATCH returning incorrect values
    By Paul103 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2018, 05:16 PM
  2. [SOLVED] INDEX & 2x MATCH returning incorrect values
    By Dan_B in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-06-2017, 06:01 AM
  3. [SOLVED] MEDIAN IF Function returning incorrect values
    By karinprft in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-22-2014, 03:48 AM
  4. [SOLVED] Index Match returning incorrect values
    By SomeDude0nline in forum Excel General
    Replies: 2
    Last Post: 07-23-2014, 10:20 AM
  5. Index match returning incorrect values
    By Mrpussalia in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 10:55 PM
  6. VLOOKUP and MATCH returning incorrect values
    By -Spax- in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 10-10-2011, 07:03 AM
  7. VLOOKUP returning incorrect values for unfound match
    By scaffdog845 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-15-2010, 01:30 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