+ Reply to Thread
Results 1 to 3 of 3

Most Recent Values by Date with Index and Match

Hybrid View

src144 Most Recent Values by Date... 07-26-2019, 02:50 PM
jason.b75 Re: Most Recent Values by... 07-26-2019, 03:20 PM
src144 Re: Most Recent Values by... 07-26-2019, 03:36 PM
  1. #1
    Registered User
    Join Date
    07-26-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    4

    Most Recent Values by Date with Index and Match

    Hello,

    I am trying to obtain values for the 10 most recent dates in column E (I can't sort by date for other reasons). Dates are in column A, values in column B. However, the index/match formula I used is pulling duplicate values for the same date instead of going to the next instance. For example, I have two values for the same date, however the formula just populates the value from the first instance. Any help would be appreciated! Spreadsheet attached.

    =INDEX($B$2:$B$21,MATCH(LARGE($A$2:$A$21,ROWS($E$2:$E2)),$A$2:$A$21,0))
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Most Recent Values by Date with Index and Match

    That's is because you're using exact match on the dates, so any tie will always return the first matching entry.

    With a single formula,
    Formula: copy to clipboard
    =INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$21)/($A$2:$A$21=LARGE($A$2:$A$21,ROWS(E$2:E2))),ROWS(E$2:E2)-COUNTIF($A$2:$A$21,">"&LARGE($A$2:$A$21,ROWS(E$2:E2)))))
    it can probably be simplified with a helper column.

    edit:-

    With a 2 column approach

    In D2, fill down 10 rows
    Formula: copy to clipboard
    =LARGE($A$2:$A$21,ROWS(D$2:D2))
    Then in E2, fill down 10 rows
    Formula: copy to clipboard
    =INDEX($B:$B,AGGREGATE(15,6,ROW($A$2:$A$21)/($A$2:$A$21=D2),COUNTIF(D$2:D2,D2)))

    I was thinking of a pivot table, but I'm not sure that you would be able to get the results in the format that you want.
    Last edited by jason.b75; 07-26-2019 at 03:26 PM.

  3. #3
    Registered User
    Join Date
    07-26-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    4

    Re: Most Recent Values by Date with Index and Match

    This is awesome...thanks!!

+ 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. Index Match Formula that Returns Most Recent Date
    By Catanzaroe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2017, 03:45 PM
  2. [SOLVED] INDEX MATCH Function with most recent date
    By thyzt in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-12-2016, 02:32 PM
  3. MATCH and INDEX to find most recent date
    By vwlibra in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2016, 01:19 AM
  4. MATCH and INDEX to find most recent date and other conditions
    By vwlibra in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2016, 08:05 PM
  5. [SOLVED] Index(Match()) to find most recent transaction for the same date
    By jonnyyyl in forum Excel General
    Replies: 3
    Last Post: 07-11-2015, 02:14 AM
  6. Replies: 6
    Last Post: 06-10-2014, 10:36 PM
  7. Index Match most recent entry
    By aronhubbard in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-10-2012, 07:02 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