+ Reply to Thread
Results 1 to 12 of 12

Summing Data Based on multiple criteria that changes

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Summing Data Based on multiple criteria that changes

    Hi Everyone,

    I am looking to get some input on if there is an Excel function that will help me achieve my end goal. I do not have a spreadsheet to share as I have not yet begun building my file.

    I have detailed department budget data which is broken down by accounts within all of my departments. I have data in all 12 months (there is a separate column for January - December with different amounts in each month).
    Column A of my data is the department number, column B is the account number and columns C through N have values for January through December.

    I want to create a consolidated summary tab that sums up each account for a couple departments at once for a specific month.

    To illustrate, I have department numbers 10,11,12,13,14,15. Within each department is account 50,100,200,300.

    I want to show the sum of each account for department 10 and 11. My summary tab will have the account numbers 50,100,200,300 in cells C4:C7. Cell D4 will have the June total in account 50 for departments 10 and 11 only. I will have a drop down menu where you can select the department numbers to include in the summary. Therefore, I would be able to change my criteria from department 10 and 11 to department 12 and 13 and have cell D4 recalculate the June total in account 50 for departments 12 and 13 this time.

    Does this make sense. Does anyone know if building something like this is possible in Excel without using macros?

    All thoughts are appreciated.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Summing Data Based on multiple criteria that changes

    Without being able to look at this workbook with you, my best guess at the moment is SUMIFS().
    (notice the plural function)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing Data Based on multiple criteria that changes

    I was thinking SUMIFS as well, but I wasn't sure how the drop down menu would be built into the function. The intention is to either select multiple departments in the drop down menu, or create department combinations on a separate tab and give each combination a named range. When I click the drop down menu and select "Marketing" for example, it would automatically know to include department 10 and 11 in my sum.

    Do you have any ideas?

  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
    53,042

    Re: Summing Data Based on multiple criteria that changes

    As far as referencing formulas are concerned, the "results"/contents of a drop-down are just like any other regular cell. All a DD does, is make it easier/more accurate to enter data in a cell - apart from that, there is no difference. So however you were going to create your calc, you would do it in the exact same way as if you were referencing a "regular" cell
    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

  5. #5
    Registered User
    Join Date
    06-04-2012
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing Data Based on multiple criteria that changes

    I am attaching a workbook I created to better illustrate by question.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,873

    Re: Summing Data Based on multiple criteria that changes

    Formula looks like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This is an array formula, it has to be entered with Ctrl + Shift + Enter.
    Attached Files Attached Files
    Last edited by Jacc; 08-14-2015 at 04:43 AM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  7. #7
    Registered User
    Join Date
    06-04-2012
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing Data Based on multiple criteria that changes

    Thank you for solving this for me. This formula should work perfectly, but when I apply it to my much larger data set, I get the dreaded:

    "Excel ran out of resources while attempting to calculate one or more formulas. As a result, there formulas cannot be evaluated."

    Any ideas how to break up this formula so the worksheet can calculate properly?

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Summing Data Based on multiple criteria that changes

    What's the larger formula you're trying?

  9. #9
    Registered User
    Join Date
    06-04-2012
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing Data Based on multiple criteria that changes

    This worked like a charm! I was able to adapt the formula to my much larger set of data.

    Thank you!!

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Summing Data Based on multiple criteria that changes

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.

  11. #11
    Registered User
    Join Date
    06-04-2012
    Location
    MA, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing Data Based on multiple criteria that changes

    I would like to add one more level of complexity to my question.

    Some of my items in my drop down list are multiple words. Is there a way I can keep them as two words in the drop down list but still reference the table in the named range?

    If you look at the solution file provided by Jacc above, can I remove the "_" from "World_Wide" in my drop down list and replace with a " " and still have the array formula in Cell D4 work correctly?

    I know this was marked as solved, so I can open a discussion if that is preferred.

    Thank you.

  12. #12
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,873

    Re: Summing Data Based on multiple criteria that changes

    I think we can continue in this thread, you can even mark it unsolved if you wish until it's completely solved.
    The reason I changed World Wide to World_Wide is that there is a named range called World_Wide and it makes it very easy to use the INDIRECT function. The name of a range can not contain spaces, hence the underscore.

    By changing the formula to this it is possible to use whatever names you want.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In this workbook I removed the named ranges and use only the Table names via VLOOKUP
    Attached Files Attached Files
    Last edited by Jacc; 08-14-2015 at 05:40 PM.

+ 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. Summing Based on Multiple Criteria
    By SJT in forum Excel General
    Replies: 4
    Last Post: 02-12-2015, 01:31 AM
  2. Help with summing based on multiple criteria
    By blaugrana9 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-15-2014, 03:50 AM
  3. [SOLVED] Help Summing Data from Table Based on Multiple Criteria
    By D. from So Cal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2014, 02:16 PM
  4. [SOLVED] Summing multiple ranges based on criteria....
    By Barking_Mad in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2014, 06:42 AM
  5. [SOLVED] Need Help Summing Multiple Columns Based On Certain Criteria
    By aleboeuf in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-17-2013, 06:31 AM
  6. Summing based on multiple criteria
    By Environment in forum Excel General
    Replies: 2
    Last Post: 08-23-2011, 10:19 AM
  7. Summing Based on Multiple Criteria
    By SJT in forum Excel General
    Replies: 1
    Last Post: 09-23-2007, 01:34 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