+ Reply to Thread
Results 1 to 15 of 15

SumIF by Category and Date Range.

  1. #1
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Question SumIF by Category and Date Range.

    Hello,
    How would I make it so that I can select from a dropdown list a category name and have only the total cost for a specific month and year for the category I selected.
    So far, my formula works so that it calculates all category name entries and inputs the total for a specific month and year which is good but I want it do it only shows value for a chosen category name (Lodge 1) from a dropdownlist.

    So far this is what I have
    =SUMIFS(AH:AH,F:F,">="&$AK2,F:F,"<="&EOMONTH($AK2,0))

    AH:AH Column consists of the Costs
    F:F Column consists of the dates
    Attached Images Attached Images
    Last edited by trini27; 09-20-2021 at 04:20 AM.

  2. #2
    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,794

    Re: SumIF by Category and Date Range.

    Just add another criterion:

    =SUMIFS(AH:AH,F:F,">="&$AK2,F:F,"<="&EOMONTH($AK2,0),range_containing_lodge_name,cell_containing_lodge_name_selected)

    10 is not an Office version - please update your profile with the correct information. Thanks.
    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.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: SumIF by Category and Date Range.

    Which column is Lodge in?

    =SUMIFS(AH:AH,C:C,"=" & $E$1,F:F,">="&$AK2,F:F,"<="&EOMONTH($AK2,0))

    The above assumes Lodge in column C and drop down in E1

  4. #4
    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,794

    Re: SumIF by Category and Date Range.

    "=" & $E$1
    $E$1 on its own would do.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: SumIF by Category and Date Range.

    @Ali: More coffee needed!!!

  6. #6
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: SumIF by Category and Date Range.

    Hello AliGW,

    Sorry, here is a better understanding for what I am trying to accomplish.


    How would I make it so that I can select from a dropdown list a category name and have only the total cost for a specific month and year for the category I selected.
    So far, my formula works so that it calculates all category name entries and inputs the total for a specific month and year which is good but I want it do it only shows value for a chosen category name (Lodge 1) from a dropdownlist.

    So far this is what I have
    =SUMIFS(AH:AH,F:F,">="&$AK2,F:F,"<="&EOMONTH($AK2,0))

    AH:AH Column consists of the Costs
    F:F Column consists of the dates entered by the user
    AJ Column is the Lodge Name
    AK is the Date
    AL Column is the Total Food Costs

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

    Re: SumIF by Category and Date Range.

    Please update your forum profile as requested above - do NOT ignore moderation requests.

    Unless there is an adjacent column with the lodge name on every row, it can't be done as Excel would not know which rows pertained to that lodge. You don't appear to have tried what we suggested ...

    There are instructions at the top of the page explaining how to attach your sample workbook.

  8. #8
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: SumIF by Category and Date Range.

    Thank you so much!
    =SUMIFS(AH:AH,G:G,$AJ$2,F:F,"<="&EOMONTH($AK2,0))
    Last edited by trini27; 09-20-2021 at 05:06 AM.

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

    Re: SumIF by Category and Date Range.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  10. #10
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: SumIF by Category and Date Range.

    Hello sorry,

    There is one glitch.

    When it totals for the Month and year range all the rows after that month get the same value in column AL.

    Only entries were made within Sept but after that every row gets the same value. So If there were entries for the month of October it will show that total number for that month and if there entries for the month of Sept it will show the total for that month.

    Jan-21 $0.00
    Feb-21 $0.00
    Mar-21 $0.00
    Apr-21 $0.00
    May-21 $0.00
    Jun-21 $0.00
    Jul-21 $0.00
    Aug-21 $0.00
    Sep-21 $5.00
    Oct-21 $5.00
    Nov-21 $5.00
    Dec-21 $5.00
    Jan-22 $5.00
    Feb-22 $5.00
    Mar-22 $5.00
    Apr-22 $5.00
    May-22 $5.00
    Jun-22 $5.00
    Jul-22 $5.00
    Aug-22 $5.00
    Sep-22 $5.00
    Oct-22 $5.00
    Nov-22 $5.00
    Dec-22 $5.00

    Thank you so much!
    =SUMIFS(AH:AH,G:G,$AJ$2,F:F,"<="&EOMONTH($AK2,0))
    Last edited by trini27; 09-20-2021 at 05:06 AM.

  11. #11
    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,794

    Re: SumIF by Category and Date Range.

    There are instructions at the top of the page explaining how to attach your sample workbook.

  12. #12
    Registered User
    Join Date
    01-13-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: SumIF by Category and Date Range.

    Ok, I have attached my workbook. Please have a look.
    Attached Files Attached Files

  13. #13
    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,794

    Re: SumIF by Category and Date Range.

    You missed a crucial criterion:

    =SUMIFS(AH:AH,G:G,$AJ$2,F:F,">="&$AK2,F:F,"<="&EOMONTH($AK2,0))

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: SumIF by Category and Date Range.

    Try

    =SUMIFS(AH:AH,G:G,$AJ$2,F:F,">=" &$AK2,F:F,"<="&EOMONTH($AK2,0))

  15. #15
    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,794

    Re: SumIF by Category and Date Range.

    Thanks for the rep. PLEASE mark the thread as solved. Thanks.

+ 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] Totals Matching Category and Date Range
    By crazyforexcel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-19-2020, 10:58 AM
  2. Replies: 5
    Last Post: 08-08-2018, 05:29 PM
  3. SUMIFS with category and date range syntax
    By SLBELL in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-14-2017, 03:01 PM
  4. Sumif Index Address and Date PLUS pulling an adjustable date range
    By scottandjennie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-07-2017, 04:24 PM
  5. Replies: 8
    Last Post: 12-20-2015, 11:46 PM
  6. [SOLVED] VBA to group totals of each category within each date range
    By Jim885 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-30-2015, 12:59 PM
  7. Find category value based on date range?
    By thewiz1972 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-09-2006, 10:35 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