+ Reply to Thread
Results 1 to 13 of 13

SUMIFS across multiple sheets

  1. #1
    Forum Contributor keith740's Avatar
    Join Date
    04-24-2015
    Location
    Racine, Ohio
    MS-Off Ver
    MS365
    Posts
    241

    Red face SUMIFS across multiple sheets

    Hello all!

    Needing some assistance with my SUMIFS formula (See Attached)
    on sheet Data2 G2

    can see me having problems with columns H:N on this sheet as well. (if have the time...)


    any help/advice is greatly appreciated!
    Attached Files Attached Files
    Last edited by keith740; 06-07-2015 at 07:10 PM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUMIFS across multiple sheets

    Withdrawn by FR

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUMIFS across multiple sheets

    You are making the same mistake that I see time and time again. You are mixing up the two elements of data capture and final reporting. The two require quite different treatments.

    A lot of people start by splitting data into what they consider a sensible arrangement, i.e. many sheets and then wonder why it's so difficult to subsequently analyse and summarise or extract information from it, Yours exhibits all those features.


    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    So put all your data on a single sheet and add an extra column which will contain whatever it is that the individual sheets represent. If these are days of the week then create a date column and record the 1st day of the week. Then you won't need any formulae at all. Just the PT.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: SUMIFS across multiple sheets

    I agree completely with Richard on this, it will be FAR simpler to run teh summaries if all data is in a single sheet.

    I am only showing this because I spent some time on it, but with your layot, you would need a convoluted formula like this...
    =SUMPRODUCT(SUMIF(INDIRECT("'Sheet"&{1,2,3,4,5,6,7}&"'!a2:a20"),$F2,INDIRECT("'Sheet"&{1,2,3,4,5,6,7}&"'!"&CHAR(CODE("a")+COLUMNS($A$1:A1))&"2:"&CHAR(CODE("a")+COLUMNS($A$1:A1))&"20")))
    copied down and across.

    If youe fata was all in 1 sheet, with an added column to ID which "sheet" (or whatever the division is), then the formula would be shortened to this...
    =SUMIFS(Sheet8!C$2:C$31,Sheet8!$B$2:$B$31,data2!$F2)
    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
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUMIFS across multiple sheets

    Or this

    The sheet names listed in E2:E8

    =SUMPRODUCT(SUMIF(INDIRECT("'"&$E$2:$E$8&"'!A2:A25"),$F2,INDIRECT("'"&$E$2:$E$8&"'!"&CELL("address",B$2)&":"&CELL("address",B$25))))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Forum Contributor keith740's Avatar
    Join Date
    04-24-2015
    Location
    Racine, Ohio
    MS-Off Ver
    MS365
    Posts
    241

    Re: SUMIFS across multiple sheets

    so i should paste daily data to 1 sheet...is that correct?

    i have hundreds of sheets...

    sorry for being noob and ty for advice

  7. #7
    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,936

    Re: SUMIFS across multiple sheets

    In that case, you will need to create a list of all your sheet names, and give that list a range name (say, sheetnames). then use something like this...
    =SUMPRODUCT(SUMIF(INDIRECT("'"&sheetnames&"'!A2:A200"),$F2,INDIRECT("'"&sheetnames&"CELL("address",B$2)&":"&CELL("address",B$25))))

    If you need a hand creating the sheet names list, let me know

  8. #8
    Forum Contributor keith740's Avatar
    Join Date
    04-24-2015
    Location
    Racine, Ohio
    MS-Off Ver
    MS365
    Posts
    241

    Re: SUMIFS across multiple sheets

    your right! that is so much easier...ty

  9. #9
    Forum Contributor keith740's Avatar
    Join Date
    04-24-2015
    Location
    Racine, Ohio
    MS-Off Ver
    MS365
    Posts
    241

    Re: SUMIFS across multiple sheets

    ty fdibbins, i may need help with that tbh... would the sheet names approach be used on the other columns as well?
    other columns as well?

  10. #10
    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,936

    Re: SUMIFS across multiple sheets

    To create a list of sheet names, you will need to enable macros (go to File/Options/Trust Center/Trust Center Settings/Macro Settings/Enable all macros)

    next, right-click on any empty cell and select Define Name,
    call it Sheetnames (can be anything, really, but thats what I used)
    in Refers to: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")
    Close

    Then, where you wan the list of sheets to be, copy this down....

    =IFERROR(INDEX(Sheetnames,ROWS($A$2:A2)),"")

    That will list all current - plus any new sheets added - that you have. You can then use that range in ther formula provided

  11. #11
    Forum Contributor keith740's Avatar
    Join Date
    04-24-2015
    Location
    Racine, Ohio
    MS-Off Ver
    MS365
    Posts
    241

    Re: SUMIFS across multiple sheets

    awesome ty guys... i learn every post!!!

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIFS across multiple sheets

    Quote Originally Posted by FDibbins View Post
    Refers to: =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")

    That will list all current - plus any new sheets added - that you have. You can then use that range in ther formula provided
    You need to make the Sheetnames formula volatile just in case you change a sheet name otherwise the INDEX formula won't update.

    Here's the method I use:

    https://www.excelforum.com/showthread.php?t=929969
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  13. #13
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUMIFS across multiple sheets

    Glad to have helped and thanks for the rep.

+ 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: 5
    Last Post: 02-06-2015, 08:44 PM
  2. [Question] Sumifs multiple sheets with flexible sheets reference
    By tranhaithang in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-29-2014, 04:53 AM
  3. [SOLVED] SUMIFS with multiple criteria between sheets
    By PrncssJ in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 03-24-2014, 01:31 PM
  4. Replies: 2
    Last Post: 01-23-2013, 06:25 AM
  5. SUMIFS on Multiple Work Sheets
    By SeaTiger in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2011, 04:56 AM

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