+ Reply to Thread
Results 1 to 3 of 3

MAX function with conditions

  1. #1
    Registered User
    Join Date
    09-27-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    2

    MAX function with conditions

    I need some help with a formula. I am trying to find the max date from a list of names. I need the max date for each unique name, but each may name occur multiple times. Here is an example

    Number Name Date
    1 John 11/22/11
    1 John 11/24/11
    1 John 12/22/11
    2 Mike 01/13/11
    2 Mike 03/22/11
    2 Mike 11/24/11
    3 Bill 11/24/11

    I need to find out which is the max date for John, Mike, and Bill based upon the number column. I have tried to use some array formulas but can't get it right. I am saying this because I have hundreds of dates/names/number combos and need to pull out the max date for each combo.

    Any idea on how to do this?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: MAX function with conditions

    You can use an "array formula" like this

    =MAX(IF(B2:B10="Mike",C2:C10))

    confirmed with CTRL+SHIFT+ENTER

    where dates are in C2:C10 and names in B2:B10

    If the latest date for each person is always the last one then you could use this non-array version

    =LOOKUP(2,1/(B2:B10="Mike"),C2:C10)
    Audere est facere

  3. #3
    Registered User
    Join Date
    09-27-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: MAX function with conditions

    Thanks Daddylonglegs, that worked out perfectly. One more question is there a way I can return the position of the cell of the max date? Or add another IF qualification to the original formula to not return a date without a code attached to it. example:

    Name Date Code
    Mike 10/24/10 WRK
    Mike 11/24/10 "blank"

    I do not want to return the date if the code is blank.

+ 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