+ Reply to Thread
Results 1 to 5 of 5

Sum values from column based on multiple criteria (month & year and text)

  1. #1
    Registered User
    Join Date
    08-20-2021
    Location
    Denver, CO
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (16.0.14228.20216) 64-bit
    Posts
    11

    Question Sum values from column based on multiple criteria (month & year and text)

    Hi all,

    I have tried all kinds of formulae on various forums and help websites but can't seem to get this to work.

    I have a large table with three columns of interest. 1) a property name 2) a date and 3) a dollar amount.

    The dates are varied, with different months, days, and years. What I am trying to do is sum the dollar amount column if a) the property name matches a reference and b) the date matches the MONTH and YEAR, regardless of the DAY.

    I have tried a pivot table as well but given the large data set with varying days months and years it is a pain to sort.

    I have attached a sample file for reference, with two yellow cells highlighted with what I would like the solution to sum.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Sum values from column based on multiple criteria (month & year and text)

    A Pivot Table does the job quite easily ( I can't reproduce your example as there is no data for 2019)
    Attached Files Attached Files

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Sum values from column based on multiple criteria (month & year and text)

    I think what manual result you have mentioned in attached excel workbook seems wrong result cell, perhaps it should be on N4 cell? If it is true then you can go with the below formula

    =SUMIFS($C$11:$C$25,$B$11:$B$25,">="&EOMONTH(B$3,-1)+1,$B$11:$B$25,"<="&B$3,$A$11:$A$25,$A4)
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Registered User
    Join Date
    08-20-2021
    Location
    Denver, CO
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (16.0.14228.20216) 64-bit
    Posts
    11

    Re: Sum values from column based on multiple criteria (month & year and text)

    Thank you both for your input.

    Pepe Le Mokko - When I try to replicate this, the Pivot Table does not create the Years column as it has in your pivot table. It just creates a separate column for each individual date, and annoyingly, when trying to sort it, I can only sort in ascending and descending, which it does by month rather than year, so it goes Nov 19 Nov 20 Nov 21 Nov 22 Dec 19 Dec 20 Dec 21 Dec 22.

    shukla.ankur281190 - This formula is not working for me in the source file.

    Both - I have attached an appended version of the ACTUAL source file. Here you can see the formula not functioning, and the pivot table not filtering by year. I am starting to thing there is some sort of formatting issue?
    Attached Files Attached Files

  5. #5
    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,830

    Re: Sum values from column based on multiple criteria (month & year and text)

    Your dates are not real dates - they are text values. How are you acquiring the data?
    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.

+ 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. Count Unique Records based on multiple criteria by month and year.
    By hecgroups in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-19-2022, 03:58 AM
  2. [SOLVED] Suming values based of multiple column categories and comparing month to month
    By benoj2005 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 12-24-2021, 03:48 AM
  3. Replies: 3
    Last Post: 02-03-2016, 01:53 PM
  4. [SOLVED] Sum of a range using multiple criteria - one of which is matching the month and year
    By mattsonberg in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-21-2014, 02:45 PM
  5. counting unique values across several criteria and date (month/year)
    By joannelittell in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-30-2013, 06:19 AM
  6. Adding values based on both month and text criteria
    By 3smees23 in forum Excel General
    Replies: 4
    Last Post: 09-02-2011, 09:11 AM
  7. SumProduct error when using Year , Month and text criteria
    By jsrobin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2008, 10:56 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