+ Reply to Thread
Results 1 to 11 of 11

Index Match Based on date range and name criteria

  1. #1
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Index Match Based on date range and name criteria

    Hi all! Happy New Year! Well new problem to solve ...

    I would like to ask how can I get to work the index match function (if there's any formula other than this current function its fine) if i have a start date and end date as range date then another criteria for name to get my desired result. im having a hard time to explain so i attached a workbook so you can around it.

    I found a formula and tweaked it but still cant get to work.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index Match Based on date range and name criteria

    Try this

    This is an array formula must be entered with Ctrl+Shift and Enter key combination.

    =INDEX($B$3:$B$7,IF($C$3:$D$7=G9,MATCH(G8,$A$3:$A$7)))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Index Match Based on date range and name criteria

    Hi AlKey, thanks for reply. i tried it but not working. and based on your formula you used "=", this will indicate the exact date not the "range" let say 11/02 - 11/04 so if i choose 11/03 it will not give me the exact result.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index Match Based on date range and name criteria

    Formula a gave you returns the correct result: =Nike. On your spreadsheet you have two criteria Name and Date so, the formula meets both and returns the correct result. How is it that the formula is not working?

    See attached file
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Index Match Based on date range and name criteria

    i called it "date range", so if i change the date to 11/13/13, not 11/14/13, it should have =nike result, however if i change the date to 11/16/13 it should change the result to =adidas. check the new workbook attached . thanks!
    Attached Files Attached Files

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index Match Based on date range and name criteria

    What is your point? You're the one who provides the requirements. If 11/13/13 date doesn't exists in your table, the formula will not retrieve the desired result. If you your criteria has two parameters then the formula should meet them not to ignore. Secondly, just because you call it "data range" it doesn't make it so.

  7. #7
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Index Match Based on date range and name criteria

    Hey AlKey, look:
    =INDEX(B3:B11,MIN(IF((G9>=C3:C11)*(G9<=D3:D11),MATCH(ROW(B3:B11),ROW(B3:B11)))))

    this array formula is somehow working on my date range: even i use "11/16/13" which is not existed on the table but still i got the desired result.

    my problem with this formula is i can't add another criteria which is the "name". Please help if someone knows how to add another criteria on this array formula.

    Thanks!

  8. #8
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Index Match Based on date range and name criteria

    hi darkhangelsk. try this array formula:
    =INDEX(B3:B11,MIN(IF(A3:A11=G8,IF(C3:C11<=G9,IF(D3:D11>=G9,ROW(B3:B11)))))-ROW(B3)+1)

    @AlKey:
    your logical tests of (G9>=C3:C11)*(G9<=D3:D11) shows up correctly as this:
    {1;0;0;0;0;0;0;0;0}
    so by right, you ought to grab the 1st cell where it 13 Nov 2013 is within C3 & D3. by doing IF & MATCH, you are simply saying do the MATCH only when the above shows 1. since the 1st one is 1, it does an approximate match (omitting the 0 is using approximate match) of finding Carlo & it's supposed to give you the last instance & the unsorted list doesn't help. even if you use exact MATCH with 0, it will still give you problems because the names might appear more than once & you are just ignoring your logical tests & return the 1st MATCH.
    Last edited by benishiryo; 01-01-2014 at 11:45 PM.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Index Match Based on date range and name criteria

    Thanks benishiryo and darkhangelsk. Glad your were able to find the right solution. Sorry couldn't get back there earlier, had to attend New Year celebration party

    Happy New Year to all.

  10. #10
    Registered User
    Join Date
    07-11-2012
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2003
    Posts
    91

    Re: Index Match Based on date range and name criteria


  11. #11
    Forum Contributor
    Join Date
    07-20-2009
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    203

    Re: Index Match Based on date range and name criteria

    Thanks benishiryo! thanks to you too ALkEY! what's good in this forum is that we ask/help and learn at the same time.

    @FLani - try it...

+ 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] Index match multiple criteria based on earliest date
    By dchubbock in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2013, 07:18 PM
  2. Index and Match with Two Criteria, and date Match Type is Less Than
    By ExcelQuestion in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-11-2013, 08:57 AM
  3. [SOLVED] INDEX MATCH based on 5 criteria, including a date range.
    By Folshot in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 09:35 PM
  4. [SOLVED] Index Match with date range criteria
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 10-24-2013, 04:58 PM
  5. Index Match based on 2 Criteria only returning 1 match
    By stsanders22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2012, 11:26 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