+ Reply to Thread
Results 1 to 6 of 6

Use INDEX function to look for nth match

  1. #1
    Registered User
    Join Date
    04-15-2020
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Office 365 ProPlus
    Posts
    9

    Use INDEX function to look for nth match

    Currently I am building an automated planning sheet which makes use of multiple worksheets. There is an overall sheet which pulls data from the project list based on the INDEX-MATCH formula.

    The problem now is, as I put two equal values (names) in the project lists beneath each other, it always pulls out the first match and does not look beyond that first match if first match is not correct for another correct match below the first given match. The match is based on the name and if it is in between the start- and end date of the given project.

    In the given Excel the problem is visualized. In sheet 'Projectenlijst', there's given two project for the first worker except within the sheet 'Overzichtsplanning' it only shows the first given match and not the second match.

    Is there any possible way for the INDEX-MATCH formula to continue searching until first found match is true?
    Attached Files Attached Files

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

    Re: Use INDEX function to look for nth match

    With regular INDEX/MATCH, thats the way it works...it finds the 1st match then stops looking.

    How would excel know that you want the 2nd match, and not the 1st?
    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
    04-15-2020
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Office 365 ProPlus
    Posts
    9

    Re: Use INDEX function to look for nth match

    Hello, thanks for your reply.

    The way I want this working is that the INDEX only returns the value if there is a match, in my case is the date is in between the given dates in the 'projectenlijst'. If this match is not there it should continue looking down whenever there is a correct match and return that value, instead of doing nothing as the first index lookup wasn't a match.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,605

    Re: Use INDEX function to look for nth match

    The following formula yields "Projectnumber_2 / Projectname_2" for Sept. 7th through 11th which I assume is the desired output:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note that the above formula removes the reference to the Verlof & ziektelijst sheet so we probably need to see some data on that sheet to know how that section should be replaced.
    Note that the formula in the post may not work for your regional settings, however the formula in cell C4 of the Overzichtsplanning sheet should.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    04-15-2020
    Location
    Utrecht, Netherlands
    MS-Off Ver
    Office 365 ProPlus
    Posts
    9

    Re: Use INDEX function to look for nth match

    Hello,

    My sincere apologies for my late reply, but this worked like a charm! Thank you very much.
    I can build the 'Verlof & ziektelijst' to this, it basically works the same except it has an additional index-match with the time stamp.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,605

    Re: Use INDEX function to look for nth match

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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: 7
    Last Post: 10-03-2019, 11:23 AM
  2. [SOLVED] Index/Match/Min/ABS Function needs to ignore one value in the index.
    By pronghorn in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-16-2019, 02:04 AM
  3. How to apply an Index.Match.Match function to all entries in a Listbox on a User Form
    By jason.drozd in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-25-2018, 01:54 AM
  4. Need help in Index, Match usage to match multiple criteria in sum function
    By Summer0830 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2017, 02:47 AM
  5. Problems applying INDEX-MATCH-MATCH function on other data
    By LennartB in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-13-2015, 05:33 AM
  6. [SOLVED] Stuck on Match function with #N/A; attempting to reverse Index/Match
    By Cappytano in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-10-2014, 06:39 PM
  7. Replies: 3
    Last Post: 06-17-2013, 12:37 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