+ Reply to Thread
Results 1 to 4 of 4

Looking for last entry using multiple criteria including date

  1. #1
    Registered User
    Join Date
    01-12-2013
    Location
    ayr
    MS-Off Ver
    Excel 2007
    Posts
    4

    Looking for last entry using multiple criteria including date

    Hi,

    I'm looking for the previous entry in column j and placing it in column h of the present row using date(coulumn b) and team(column c) criteria.
    aaaaaBaaaaCaaaaHaaJ
    2/4/2003 Team A 45 55
    2/4/2003 Team B 67 53
    2/4/2003 Team C 12 23
    9/4/2003 Team A 55 38
    9/4/2003 Team B 67 66
    9/4/2003 Team C ?

    Question mark would read 23.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Looking for last entry using multiple criteria including date

    Hi and welcome to the forum

    I would do this using a helper column. (I used A, youe what you want and adjust the references accordingly) - you can hide the helper if needed....
    in A, copued down (assuming your data starts in row 2...
    =B2&C2

    Then use this to find the value you want...
    =INDEX(J2:J6,MATCH(MAX(IF(C2:C6=C7,B2:B6,0))&C7,A2:A6,0),1)
    note: that is an array formula and must be entered using CRTL SHIFT enter, not just enter

    Hope that helps
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-12-2013
    Location
    ayr
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Looking for last entry using multiple criteria including date

    Quote Originally Posted by FDibbins View Post
    Hi and welcome to the forum

    I would do this using a helper column. (I used A, youe what you want and adjust the references accordingly) - you can hide the helper if needed....
    in A, copued down (assuming your data starts in row 2...
    =B2&C2

    Then use this to find the value you want...
    =INDEX(J2:J6,MATCH(MAX(IF(C2:C6=C7,B2:B6,0))&C7,A2:A6,0),1)
    note: that is an array formula and must be entered using CRTL SHIFT enter, not just enter

    Hope that helps
    Thanks, getting n/a when I enter formula.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Looking for last entry using multiple criteria including date

    upload a sample workbook please

+ 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