+ Reply to Thread
Results 1 to 7 of 7

Return most recent value with 1 criteria

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-02-2022
    Location
    USA
    MS-Off Ver
    2021
    Posts
    168

    Return most recent value with 1 criteria

    Hi I want my formula to return the most recent value, based on 1 criteria I am using a MAXIF formula but it seems to not be working.

    My formula is =MAXIFS(Table1[Amount],Table1[Category],F2,Table1[Date],MAX(Table1[Date]))

    F2 = criteria

    In cell H2 the answer should be "844"

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Return most recent value with 1 criteria

    To get 844, please try:
    Formula: copy to clipboard
    =MAXIFS(Table1[Amount],Table1[Category],F2,Table1[Date],G2)

  3. #3
    Forum Contributor
    Join Date
    12-02-2022
    Location
    USA
    MS-Off Ver
    2021
    Posts
    168

    Re: Return most recent value with 1 criteria

    Is there a way to get 884 without targeting G2?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,031

    Re: Return most recent value with 1 criteria

    Try this:

    =LET(d,MAXIFS(Table1[Date],Table1[Category],F2),MAXIFS(Table1[Amount],Table1[Category],F2,Table1[Date],d))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Contributor
    Join Date
    12-02-2022
    Location
    USA
    MS-Off Ver
    2021
    Posts
    168

    Re: Return most recent value with 1 criteria

    Worked perfect! Thank you!

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Return most recent value with 1 criteria

    It is also possible to retrieve both values (date and amount) in one formula in many different ways:

    One way

    Please empty H2 and try in G2:
    Formula: copy to clipboard
    =LET(t,MAXIFS(Table1[Date],Table1[Category],F2),CHOOSE({1,2},t,XLOOKUP(t,Table1[Date],Table1[Amount])))
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,031

    Re: Return most recent value with 1 criteria

    You're welcome.

+ 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] Need formula to return most recent balance with most recent date with 1 criteria
    By thematrix05 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2023, 04:50 PM
  2. Return most recent value that is not Zero
    By klkenny in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-29-2022, 07:18 PM
  3. [SOLVED] Need help with Formula that uses most recent date/last name as criteria to return results
    By jeschumacher in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-10-2021, 07:56 AM
  4. [SOLVED] Return most recent occurrence in list based on multiple array criteria
    By Marbleking in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-05-2020, 03:37 PM
  5. [SOLVED] Formula to Return most recent date when criteria are matched
    By lkndllsgrl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-12-2015, 11:36 AM
  6. How to return value that's the most recent?
    By surfol in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2010, 09:15 AM
  7. Return Value with most recent date
    By Kles in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-14-2009, 05:52 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