+ Reply to Thread
Results 1 to 7 of 7

Summing Values for specific months and years

  1. #1
    Registered User
    Join Date
    03-27-2014
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2013
    Posts
    13

    Summing Values for specific months and years

    Hi,

    I will set a base example first:


    9 Nov 2012 Apple 5
    12 Dec 2012 Apple 3
    14 January 2013 Banana 8
    17 January 2013 Apple 6
    20 January 2014 Apple 3

    I would like a sumifs formula please that will help me only add the results for Apple - as follows:

    Nov 2012 5
    Dec 2012 3
    Jan 2013 6 (i.e. does not include Banana - and also does not include Jan 14 Apple)

    Although I have experience with sumifs I have not been able to use the correct syntax to identify the month AND year.

    Ultimately I want to look through many hundreds of dates, and add anything that fits two criteria - 1) a 'name' criteria, and 2) it falls within a certainly month and year.

    Thanks for your help - I can supply the actual spreadsheet to anyone who is able to provide genuine assistance, if that is easier.

    Kind regards

    Ed

  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,933

    Re: Summing Values for specific months and years

    hi and welcome to the forum

    Seems to me you already know what you want?

    =sumifs(sumrange,fruit-range,"apples",daterange,">="&A1,daterange,"<="&B1)

    Where A1 and B1 contains the date ranges
    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
    03-27-2014
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Summing Values for specific months and years

    Thanks very much for your reply - yes, I do 1/2 know what I need to do but not 100%!

    I should have said (I think - as it may make a difference):

    The range of dates I am searching through are in DD/MM/YYYY format, where as the dates I am searching FOR are in MMM/YY format.

    6/02/2014
    12/02/2014
    13/02/2014
    27/02/2013
    18/02/2014
    21/02/2014
    12/03/2014
    14/03/2014


    Nov-13
    Dec-13
    Jan-14
    Feb-14
    Mar-14

    So in the example you have given - thank you - is dateA1 Feb-14 and dateB1 Mar-14? (and so on)

    Or does the formula need to be adjusted to account for this?

    Thanks again,

    Ed

  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,933

    Re: Summing Values for specific months and years

    Real dates are acutally just a (now) 5-digit number representing the number of days passed since 1/1/1900, so the actual format doesnt really make a difference.

    What will make a difference, is if the 2nd set of dates are not real dates, but text that looks like a date.

    Can you upload a sample workbook, showing what you have and what you want?

  5. #5
    Registered User
    Join Date
    03-27-2014
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Summing Values for specific months and years

    Thanks for your help.....as I have said on the spreadsheet - I have just put any old thing in for the second set of criteria (date) as that is what I am trying to correct.

    As I said earlier, it needs to ensure it has the correct month and year, not just the correct month.

    Cheers,

    Ed

    (It is a list of dividend payments for various stocks).
    Attached Files Attached Files

  6. #6
    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,933

    Re: Summing Values for specific months and years

    Based on your sample data, try this, copied down and across...
    =SUMIFS($C$3:$C$22,$A$3:$A$22,">="&$A28,$A$3:$A$22,"<"&EDATE($A28,1),$B$3:$B$22,B$27)

  7. #7
    Registered User
    Join Date
    03-27-2014
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Summing Values for specific months and years

    Great - working perfectly! Took a wee bit of getting in properly as the data was in a separate worksheet - but yes it seems to work great.

    So THANK YOU very much for your great help - I'll try and find something more taxing for you next time!

    Regards
    Ed

+ 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. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  2. [SOLVED] Summing Specific Months Using Checkboxes
    By bbg22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-05-2013, 02:10 AM
  3. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  4. Replies: 9
    Last Post: 01-22-2009, 06:01 PM
  5. Replies: 15
    Last Post: 12-09-2006, 05:27 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