+ Reply to Thread
Results 1 to 12 of 12

SUMIFS Function with latest dates as one of the Criteria.

  1. #1
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    SUMIFS Function with latest dates as one of the Criteria.

    Hello Members,

    I am using excel 2016 and have some data (please see attachment). Trying to use SUMIFS function to find 'Amount' of last sold item.

    I'm stuck on how to put recent date as criteria in function.

    Can you please help on how to achieve this.

    Thanks
    Attached Files Attached Files
    Last edited by laxminarayana; 09-04-2022 at 03:41 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: SUMIFS Function with latest dates as one of the Criteria.

    No attachment.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: SUMIFS Function with latest dates as one of the Criteria.

    Sorry. I missed. Now included in original post.
    Last edited by laxminarayana; 09-03-2022 at 07:14 PM.

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,831

    Re: SUMIFS Function with latest dates as one of the Criteria.

    I see a picture, but not an attachment. Please read the yellow banner at the top of the page.

  5. #5
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: SUMIFS Function with latest dates as one of the Criteria.

    My bad. Attached sample in excel format.
    I have tried below formula, but something seems to be wrong.
    =SUMIFS(D2:D10,A2:A10,"Capsicum",B2:B10,"Yellow",C2:C10,MAX(C2:C10))
    Last edited by laxminarayana; 09-04-2022 at 03:51 AM.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: SUMIFS Function with latest dates as one of the Criteria.

    make a table of the data => insert => table.

    sort the data on column C (A-Z)

    F2 =A2&B2

    E2=IF(COUNTIF(F$2:$F$10,$F2)=COUNTIF($F2:$F2,F2),"yes","")

    filter on column E with the value yes


    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

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

    Re: SUMIFS Function with latest dates as one of the Criteria.

    I am using excel 2016
    Then please update your forum profile, which tells us you are using Excel 2007.

    Not clear to me.

    Maybe this???

    =MAX(IF(A2:A10="Capsicum",IF(B2:B10="Yellow",C2:C10)))

    Or this???

    =MAX(IF(A2:A10="Capsicum",IF(B2:B10="Yellow",D2:D10)))

    Enter with CTRL+SHIFT+ENTER.
    Last edited by AliGW; 09-04-2022 at 06:47 AM. Reason: Typo corrected.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: SUMIFS Function with latest dates as one of the Criteria.

    @Ali: suspect the second one should be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: SUMIFS Function with latest dates as one of the Criteria.

    Yes - correct. Typo on my part - will update. Thanks.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: SUMIFS Function with latest dates as one of the Criteria.

    @Ali: plus some brackets, I think

  11. #11
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: SUMIFS Function with latest dates as one of the Criteria.

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    R
    1
    Category
    Sub Category
    Date Sold
    Amount
    2
    Apples
    Green
    8/15/2022
    30
    Amount
    3
    Capsicum
    Yellow
    8/10/2022
    50
    50
    =AGGREGATE(14,6,D2:D10/(A2:A10=A3)/(B2:B10=B3)/(C2:C10=AGGREGATE(14,6,C2:C10/(A2:A10=A3)/(B2:B10=B3),1)),1)
    4
    Grapes
    Green
    7/17/2022
    60
    5
    Grapes
    Black
    7/15/2022
    70
    6
    Capsicum
    Yellow
    8/5/2022
    50
    7
    Capsicum
    Green
    8/3/2022
    45
    8
    Apples
    Green
    8/31/2022
    40
    9
    Grapes
    Black
    7/5/2022
    70
    10
    Apples
    Red
    8/15/2022
    50

  12. #12
    Registered User
    Join Date
    01-12-2014
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    77

    Re: SUMIFS Function with latest dates as one of the Criteria.

    Thank you very much. This helped me.

+ 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. SUMIFS - Multiple criteria and dates
    By d0288 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2020, 07:23 AM
  2. Sumifs between two dates - multiple criteria
    By mmaya4 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-05-2016, 07:50 PM
  3. SUMIFS using consectuvie dates as a criteria
    By Nadine67 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-10-2016, 05:59 PM
  4. Sumifs (criteria between two dates)
    By Arcanus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-13-2013, 02:16 PM
  5. Need function that gets latest dates in comments cell
    By ckolawall in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2013, 10:51 AM
  6. Sumifs with dates as criteria
    By MARKSTRO in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-19-2013, 05:58 PM
  7. SUMIFS, problem with Dates as Criteria
    By GMANFG in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2009, 01:15 PM

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