+ Reply to Thread
Results 1 to 7 of 7

Lookup dates in cell range and return latest date and name

  1. #1
    Registered User
    Join Date
    09-10-2016
    Location
    Birmingham, UK
    MS-Off Ver
    2010
    Posts
    28

    Lookup dates in cell range and return latest date and name

    Hi people,

    Second post of the day, this one I haven't even tried tackling myself as its way beyond my excel skills.

    I have attached a sheet and I was wondering if there is a formula to return the name that contains the latest date. I have arrowed the date range. I have used =min to give me the latest date in the range but is there a way of showing the name?

    Any help much appreciated
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-10-2016
    Location
    Birmingham, UK
    MS-Off Ver
    2010
    Posts
    28

    Re: Lookup dates in cell range and return latest date and name

    just to add,

    Is there anyway of creating a list of the names in order of date or is this a module/macro issue?

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Lookup dates in cell range and return latest date and name

    This formula in E25 works for the data that you have:

    =INDEX($A:$A,MATCH(MIN(B$12:B$22),$B:$B,0))

    but I suspect that is only part of the story if the grey cells might contain other dates, as the MATCH function works on a single column at a time.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    09-10-2016
    Location
    Birmingham, UK
    MS-Off Ver
    2010
    Posts
    28

    Re: Lookup dates in cell range and return latest date and name

    Hi Pete,

    Yes your correct, any of the cells in the grey area could have a date in them, so the formula would need to search by column and row, we have a spreadsheet at work that does something similar and I have tried to copy the formulas to no avail.

    Basically the sheet you are looking at is to record when my staff carry out tea making duties lol. As they work various shifts it will depend on the latest date who carries this duty out on a specific shift. We can populate the cells and work this out manually but I thought a formula may make this a bit quicker.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Lookup dates in cell range and return latest date and name

    use this arrasy formula:

    =INDEX($A$12:$A$22,MIN(IF($B$12:$AF$22=MAX($B$12:$AF$22),ROW($B$12:$AF$22)-MIN(ROW($B$12:$AF$22))+1)))

    But don't use merged cells. they are the spawn of satan and will give you endless problems!!!

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    09-10-2016
    Location
    Birmingham, UK
    MS-Off Ver
    2010
    Posts
    28

    Re: Lookup dates in cell range and return latest date and name

    Works perfectly, thankyou very much.

    P.S - As i get a little better at using excel I am realising the merged cells comment

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Lookup dates in cell range and return latest date and name

    You're welcome and thanks for the Reputation.

+ 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] Lookup the date and return the latest value under some conditions from multiple columns
    By PMH2384 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-09-2016, 03:31 AM
  2. Replies: 3
    Last Post: 04-08-2014, 02:34 AM
  3. Replies: 2
    Last Post: 06-07-2013, 02:21 PM
  4. Replies: 8
    Last Post: 11-19-2012, 06:58 PM
  5. [SOLVED] Return latest Date from cell containing several dates?
    By Motox in forum Excel General
    Replies: 2
    Last Post: 09-10-2012, 07:26 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