+ Reply to Thread
Results 1 to 2 of 2

MATCH and INDEX to find most recent date

  1. #1
    Registered User
    Join Date
    01-03-2014
    Location
    Tampa
    MS-Off Ver
    Excel 2007
    Posts
    5

    MATCH and INDEX to find most recent date

    MATCH and INDEX to find most recent date

    I am trying to find a solution to interpreting a complex military policy involving dates and relevant # of months. I am using 2016 but most everyone in my community uses Excel 2010 or 2007. I am trying to use MIN or MAX in conjunction with INDEX MATCH function, and I'm getting really stuck because I have other formulas and I'm not sure how to nest them.


    ISSUE:

    For each row, I need to find the number of months between the FIRST MONTH of the current (qualifying) activation, and the LAST MONTH of the previous (qualifying) activation.

    Example: I want to find the number of months between activation #7 and #4

    Currently, my formula finds this number by reading up one row, and based on the condition the months are calculated:

    In Column H
    =IF(G7="no","0",(YEAR(B8)-YEAR(C7))*12+MONTH(B8)-MONTH(C7))

    B-Start C-End G-qual? H-#months
    1 7/11/2005 9/23/2006 no 0
    2 7/11/2007 9/23/2008 yes 0
    3 7/11/2009 9/23/2010 yes 10
    4 5/1/2011 2/20/2012 yes 8
    5 10/1/2014 11/26/2014 no 32
    6 12/1/2014 9/30/2015 no 0
    7 1/10/2016 12/1/2016 yes 0


    SOLUTION NEEDED:

    If G7="yes", find number of months between date in B7 (START) and date in column C:C (END) that matches the row with the most recent occurence with "yes"

    I have highlighted the cell in the Calcs2_Hide sheet to help decipher my notes.


    Hope this made sense. Thank you in advance for any help.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,220

    Re: MATCH and INDEX to find most recent date

    Hi vwlibra,

    Try something like this in 4H and pull it down. I've divided by number of days by 30 to get close to months.

    =IF(G4="no",0,B4-MAXIFS($C$2:$C4,$G$2:$G4,"yes",$C$2:$C4,"<"&C4))/30

    I think that 2016 now has MaxIFS in it that you can use on this problem.
    https://blogs.office.com/2016/02/23/...ng-experience/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say 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. 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
  2. [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
  3. [SOLVED] I need an index match formula to find text in a column and a date in a row.
    By joshie78 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-25-2014, 03:48 AM
  4. Replies: 6
    Last Post: 06-10-2014, 10:36 PM
  5. Using index match but there are multiple matches, i want the most recent
    By simongood in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-08-2014, 11:30 PM
  6. Index Match most recent entry
    By aronhubbard in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-10-2012, 07:02 PM
  7. Find most recent date
    By Andi Sea in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-08-2006, 07:10 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