+ Reply to Thread
Results 1 to 8 of 8

Formula to find the latest date of a specified occurance

  1. #1
    Registered User
    Join Date
    01-14-2013
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Formula to find the latest date of a specified occurance

    Greetings!

    If someone could please help with this...I need a formula that looks up a value of a cell (C4) in column 2 of my second table and then returned the latest date (from column 1) of that incident to the cell (G4).

    I have attached my worksheet - please let me know if you are not understanding what I am trying to do.

    Thank you.
    Attached Files Attached Files
    Last edited by happyhorse; 01-14-2013 at 12:59 PM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Formula to find the latest date of a specified occurance

    In cell G4:

    =MAX(INDEX($B$12:$B$30*($C$12:$C$30=C4),0))

  3. #3
    Registered User
    Join Date
    01-14-2013
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula to find the latest date of a specified occurance

    Thanks so much, Andrew-R - it worked perfectly!

  4. #4
    Registered User
    Join Date
    01-14-2013
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula to find the latest date of a specified occurance

    Sorry, I need to re-open this thread. When I use this formula, if there is nothing for the event in the list of my 2nd table, it defaults to showing 0-Jan-00. How do I make it stay blank?

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Formula to find the latest date of a specified occurance

    Like this...

    =IF(C4="","",MAX(INDEX($B$12:$B$30*($C$12:$C$30=C4),0)))

    Again in G4 and copied down.

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

    Re: Formula to find the latest date of a specified occurance

    Try this one, which is an extension of Andrew's formula..

    =IF(MAX(INDEX($B$12:$B$30*($C$12:$C$30=C4),0))=0,"",MAX(INDEX($B$12:$B$30*($C$12:$C$30=C4),0)) )
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Formula to find the latest date of a specified occurance

    Actually the best combination of the two is probably:

    =IF(COUNTIF($C$12:$C$30,C4)=0,"",MAX(INDEX($B$12:$B$30*($C$12:$C$30=C4),0)))

  8. #8
    Registered User
    Join Date
    01-14-2013
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Formula to find the latest date of a specified occurance

    Andrew - I am getting the same results with this.

    Marvin - This worked!

    Thanks to both of you for your quick responses!!! Love this forum!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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