+ Reply to Thread
Results 1 to 4 of 4

Index Match & Duplicate values

  1. #1
    Registered User
    Join Date
    04-29-2016
    Location
    California
    MS-Off Ver
    2013
    Posts
    4

    Index Match & Duplicate values

    In Column A, I have a list of values which act as a "ID number" for a location. In Column B, I have a list of location numbers that correlate with the ID number found in Column A. I also have Column C, where the values represent the same list of location numbers found in Column B in a random order, but do not have a ID number for that location correlating to them, like Column B does in its relationship to Column A.

    I'm trying to match Column B with Column C. If B and C are a match, I'd like the value in Column A that relates to Column B to placed in Column D (which is empty), which will act as the ID number for Column C.

    To achieve this match, I used the formula: =INDEX(A:A,MATCH(C2,B:B,0))

    Unfortunately, my spreadsheet has many duplicate values that need to be matched in a repetitive manner and the formula is overlooking them, rendering the value in Column D as "N/A". Is there a way to improve the formula to calculate all duplicates and not overlook them.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Index Match & Duplicate values

    If you are getting #N/A, this implies that the formula was not able to find an exact match in column B - perhaps you have leading or trailing spaces, or your Location numbers in column B are text values but those in column C are numeric values (which are not the same to Excel), or vice-versa. If it is the latter, then you can try either of these in D2:

    =INDEX(A:A,MATCH(C2&"",B:B,0))

    or:

    =INDEX(A:A,MATCH(C2*1,B:B,0))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-29-2016
    Location
    California
    MS-Off Ver
    2013
    Posts
    4

    Re: Index Match & Duplicate values

    Hi Pete, Thanks for your help.

    I should have clarified. The bulk of the N/A's can be ignored as they won't match the location ID. My problem is there is 2,570 station IDs (Column A) and the same amount of values in Column B. For whatever reason, both your formulas and mine, only return a match for 2,466 values, instead of the 2,570. I've found a few instances where 3 of 4 duplicates will have the correct value returned, but the fourth one is ignored entirely. Does this help?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Index Match & Duplicate values

    Perhaps that value which is ignored is of a different format to the other three (i.e. text instead of number, or vice-versa). Copy one of the cells where there is a match into the cell that doesn't match in order to correct the format.

    Hope this helps.

    Pete

+ 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] Avoiding Duplicate Values when using INDEX/MATCH
    By CharlieVictorEcho in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-11-2023, 03:45 PM
  2. [SOLVED] Sum Duplicate Index-match-match Values
    By djh30 in forum Excel General
    Replies: 3
    Last Post: 01-06-2015, 11:27 PM
  3. Index Match with Duplicate Values
    By js2178a in forum Excel General
    Replies: 2
    Last Post: 09-28-2014, 02:21 AM
  4. index match with duplicate values - how to get latest value
    By helpme10 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-29-2013, 02:13 PM
  5. [SOLVED] Index and match functions for duplicate values
    By JBERK in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-23-2012, 10:48 AM
  6. Index/Match where data has duplicate values
    By ragatha in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-06-2012, 12:09 PM
  7. Excel, Match/Index when duplicate values?
    By Fizziii in forum Excel General
    Replies: 0
    Last Post: 01-18-2011, 02:12 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