+ Reply to Thread
Results 1 to 8 of 8

Return Latest Date from List of Various Activities

  1. #1
    Registered User
    Join Date
    03-20-2006
    Posts
    14

    Question Return Latest Date from List of Various Activities

    1) I have a list of 10 activities which are periodically performed at different intervals. (we will be adding more activities)

    2) I have a list of every time an activity is executed which records what activity and the date of execution. This is the "activity register"

    3) I created a distinct unique list of values from the "activity register"

    The real question: I want to populate the "last executed date" from the "activity register" into the "last executed" column, keeping in mind the "activity register" will grow and the number of unique activities will also grow.

    I tried messing with arrays but couldn't find what I needed.

    See attached spreadsheet which has some sample data.
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Return Latest Date from List of Various Activities

    If your dates are in chronological order use in Cell C3
    =LOOKUP(2,1/($F$21:$F$33=A3),($G$21:$G$33))


    Even if they are not in chronological order, this will work
    =MAX(INDEX($G$21:$G$33*($F$21:$F$33=A3),0))

    You may replace the reference in Column F with a named range to accommodate more/less entries
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Return Latest Date from List of Various Activities

    This works:

    =MAX((A3=F$21:F$33)*(G$21:G$33))

    As an array formula.
    Format the result as Date.
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  4. #4
    Registered User
    Join Date
    03-20-2006
    Posts
    14

    Question Re: Return Latest Date from List of Various Activities

    Quote Originally Posted by Ace_XL View Post
    If your dates are in chronological order use in Cell C3
    =LOOKUP(2,1/($F$21:$F$33=A3),($G$21:$G$33))


    Even if they are not in chronological order, this will work
    =MAX(INDEX($G$21:$G$33*($F$21:$F$33=A3),0))

    You may replace the reference in Column F with a named range to accommodate more/less entries
    Hi Ace_XL,

    This worked well and I've gone further to improve my file with dynamic named ranges (using offset), organized into various sheets, etc.

    However, when I try to use the =MAX(INDEX(.....) formula with my named range I am getting "N/A"

    I have attached another file (activity_master_record_20191210.xlsx)and you can see the error on sheet "overview", cell "C2"

    Any idea what I have screwed up?
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Return Latest Date from List of Various Activities

    change your named range definition to:

    =OFFSET('activity register'!$B$2,0,0,COUNTA('activity register'!$B:$B)-2,1)

    It works.

  6. #6
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Return Latest Date from List of Various Activities

    make sure number of items in your named range matches with number f items in ('activity register'!$A$2:$A$14=A2).

  7. #7
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Return Latest Date from List of Various Activities

    Better yet. Use following for your named ranges and use the formula below.

    data_activity_register =OFFSET('activity register'!$A$2,0,0,COUNTA('activity register'!$A:$A)-1,1)
    data_executed_date =OFFSET('activity register'!$B$2,0,0,COUNTA('activity register'!$B:$B)-1,1)

    HTML Code: 

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Return Latest Date from List of Various Activities

    Quote Originally Posted by aragno View Post
    Hi Ace_XL,

    This worked well and I've gone further to improve my file with dynamic named ranges (using offset), organized into various sheets, etc.

    However, when I try to use the =MAX(INDEX(.....) formula with my named range I am getting "N/A"

    I have attached another file (activity_master_record_20191210.xlsx)and you can see the error on sheet "overview", cell "C2"

    Any idea what I have screwed up?
    Your ranges are inconsistent. The named range is Rows 2 to 16, so your other range should also be the same i.e.

    In Cell C2
    =MAX(INDEX(data_executed_date*('activity register'!$A$2:$A$16=A2),0))

+ 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] return the latest date ?
    By guanqiao in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-29-2015, 06:21 PM
  2. Find latest date in a column and return a value with that date
    By Neyme in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2015, 01:50 PM
  3. Replies: 8
    Last Post: 04-08-2015, 10:10 PM
  4. return the latest attempt at an exam from a list
    By reganm in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-10-2014, 09:44 AM
  5. [SOLVED] Return the value from the row with latest date
    By G.Bregvadze in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 09:14 AM
  6. Excel 2007 : Lookup a value and return the latest date
    By pinkshirt in forum Excel General
    Replies: 4
    Last Post: 07-04-2011, 06:13 AM
  7. Return the latest date from a list of dates
    By davidp in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-17-2005, 09:06 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