+ Reply to Thread
Results 1 to 5 of 5

Select Max Date Based on Multiple Criteria with Wildcard Text

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    9

    Select Max Date Based on Multiple Criteria with Wildcard Text

    I am trying to pull the most recent "date" (column A) in the past if the "activity type" was meeting (column B) and the "participants" included *bob (column C), but bob is in a string of text, not always at the beginning, middle or included at all. I put them in descending order by date for ease of reference, but the dates are random in the report.The formula should ignore dates in the future.

    Date: Most recent in past
    Activity: =Meeting
    Participant: Contains *Bob

    The answer should be 1/1/13:
    Date Activity Participants
    1/1/2010 Call Jill; Bob; Mike
    12/1/2012 Meeting Joe
    1/1/2013 Meeting Bob; Joe; Jim
    2/1/2013 Call Jim; Bob
    3/15/2013 Call Julie; Bob
    4/15/2013 Meeting Mike, Michelle; Bob
    5/1/2013 Call Jill, Bob
    6/1/2015 Meeting Mike; Bob

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

    Re: Select Max Date Based on Multiple Criteria with Wildcard Text

    Try an array formula like this

    =MAX(IF(A2:A100<=TODAY(),IF(B2:B100="Meeting",IF(ISNUMBER(SEARCH("Bob",C2:C100)),A2:A100))))

    confirmed with CTRL+SHIFT+ENTER
    Audere est facere

  3. #3
    Registered User
    Join Date
    02-27-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Select Max Date Based on Multiple Criteria with Wildcard Text

    Perfect. Thank you!!

  4. #4
    Registered User
    Join Date
    02-27-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Select Max Date Based on Multiple Criteria with Wildcard Text

    Two follow-up questions:
    1. Can this be done not using the array function (C+S+E)?
    2. If there are no meetings/calls that meet the criteria, it returns 1/0/1900. I cannot figure out where to add "NA" in the string if false, or there are no matches.

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

    Re: Select Max Date Based on Multiple Criteria with Wildcard Text

    You can add an INDEX function and change the formula syntax slightly so you don't need CSE, i.e.

    =MAX(INDEX((A2:A100<=TODAY())*(B2:B100="Meeting")*ISNUMBER(SEARCH("Dave",C2:C100))*A2:A100,0))

    [not so easy to do for MIN, though]

    When you get 1/0/1900 that's just zero formatted as m/d/yyyy - if you change the format to a custom format of m/d/yyyy;; then it will display as blank....or a custom format of m/d/yyyy;;"NA" will display NA (although the actual cell value will still be zero)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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