+ Reply to Thread
Results 1 to 5 of 5

Sum cell across multiple sheets depending on multiple criteria

  1. #1
    Registered User
    Join Date
    07-15-2016
    Location
    New York
    MS-Off Ver
    2007
    Posts
    2

    Sum cell across multiple sheets depending on multiple criteria

    Please see the attached file. I have a summary tab that manually sums across all of the sheets and a range data tab that allows for the ranges of sheets and drop down menus. What I'm trying to accomplish is for each cell to sum the corresponding cell across all sheets that have the matching data. For example, we would like to pull the sum of all data fields for all Sundays where Butler and then Gionnico were supervising. I've tried a variety of SUMIFS and SUMPRODUCT statements but can only seem to get them to work on one of the criteria. Please help!
    Attached Files Attached Files

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

    Re: Sum cell across multiple sheets depending on multiple criteria

    TRY

    =IFERROR(SUMPRODUCT(SUMIFS((INDIRECT("'"&Sheets&"'!B6")),INDIRECT("'"&Sheets&"'!B1"),$B$1,INDIRECT("'"&Sheets&"'!E1"),$E$1:$F$1)),"")

    NOTE: I unmerged the Supervisor cells in SUMMARY so there is a contiguous range

    It also checks only E1 in the "Day" sheets

    Also note you could do your summations using:

    =SUM('Day 1:Day 31'!I16)
    Attached Files Attached Files
    Last edited by JohnTopley; 07-19-2016 at 12:19 PM.

  3. #3
    Registered User
    Join Date
    07-15-2016
    Location
    New York
    MS-Off Ver
    2007
    Posts
    2

    Re: Sum cell across multiple sheets depending on multiple criteria

    Thank you. We're definitely making progress. It appears your formula doesn't calculate in the second supervisor field. Could this be because these fields are merged in the Day tabs? Also, when I copy and paste to my January data file, all fields come up blank. If I remove the IFERROR, I get a #NAME? error.

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

    Re: Sum cell across multiple sheets depending on multiple criteria

    You are correct that it only counts the FIRST supervisor in the "Day" sheets BUT it does count if there are 3 supervisors selected in SUMMARY and each appears in E1 in the "Day" sheets. I am sure there will be a way to match more than one but I could not get it to work. Hopefully one of the gurus will look at this.

    Have you the named range "Sheets" in your January file? I cannot think why else you would get a #NAME error.

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

    Re: Sum cell across multiple sheets depending on multiple criteria

    Further testing shows it only works on a single cell i.e. E1 not across several as I previously stated.

    =IFERROR(SUMPRODUCT(SUMIFS((INDIRECT("'"&Sheets&"'!B6")),INDIRECT("'"&Sheets&"'!B1"),$B$1,INDIRECT("'"&Sheets&"'!E1"),$E$1)),"")

    And the reason is: ranges in SUMIFS must be the same number of rows and columns .
    Last edited by JohnTopley; 07-20-2016 at 01:42 AM.

+ 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] Sum using Multiple criteria over multiple sheets and multiple ranges
    By l7faa in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-10-2016, 04:36 PM
  2. Select a cell at random based on multiple selection criteria across multiple sheets.
    By scottyms in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2016, 09:44 AM
  3. [SOLVED] SUMPRODUCT of multiple columns with multiple criteria over multiple sheets
    By BellyGas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2015, 08:27 AM
  4. Multiple cells, multiple sheets, multiple criteria matching
    By Drudnits1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-17-2014, 12:12 PM
  5. [SOLVED] copy row to other sheets depending on cell value (multiple values!)
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-26-2013, 07:01 AM
  6. [SOLVED] Counting multiple items with multiple criteria from multiple sheets?
    By essee in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-23-2013, 01:56 AM
  7. Creating multiple sheets depending a cell count
    By burlywood66 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2010, 05:25 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