+ Reply to Thread
Results 1 to 13 of 13

Sumifs across multiple worksheets

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Sumifs across multiple worksheets

    Hello,

    I am trying to 'sumifs' across multiple worksheets, but am failing. Please see the attached sheet and the cell A5 on 'Assistencia' for what I am trying for but I want to calcualte a total of all the months onto the 'assistencia' sheet.

    I have looked on the forum and I can see there are very elegant ways of doing this, but I just can't seem to replicate them. I would appreciate any help and also, if anyone has the time, it would be great if you could just breakdown a little what the different parts of the formula refer to as I would love to learn the technique.

    Many thanks,


    John
    Attached Files Attached Files
    Last edited by JohnFex; 02-21-2012 at 03:25 PM. Reason: Solved

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Sumifs across multiple worksheets

    ...am trying to 'sumifs' across multiple worksheets, but am failing. Please see the attached sheet and the cell A5 on 'Assistencia'
    You mean,In D5??

    Then try this.

    =SUMPRODUCT((('ENE 2012'!B5:B10="JENNIFER")*('ENE 2012'!C5:C10="SOTO")*('ENE 2012'!D5:D10)))

    Hope to helps you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sumifs across multiple worksheets

    Many thanks and sorry for my poor explaination.

    You are quite right - D5. But what I am looking for it to do is to sum the totals of each month, with those sumifs criterias into a total on the first tab.

    Thanks,


    John
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sumifs across multiple worksheets

    Fotis,

    Thank you for your initial reply, but it didn't quite answer my question. Could you have another look?

    Thanks,


    John

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,542

    Re: Sumifs across multiple worksheets

    I'm not quite sure where you're going with this. I don't believe you can use SUMIFS or SUMPRODUCTS across sheets. You *can* use SUM.

    The way to approach this is to "bookend" the sheets that you want to sum. For example, create Start and End worksheets (which you don't need to access and can hide). And then you would have the following sheets:

    Start .. January .. February ........ November .. December .. End.

    Then, if you want to sum all the cells at E5 on each sheet, instead of:

    =SUM('ENE 2012'!E5)+'FEB 2012'!E5+'MAR 2012'!E5+'APR 2012'!E5+'MAYO 2012'!E5+'JUN 2012'!E5+'JUL 2012'!E5+'AGO 2012'!E5+'SEP 2012'!E5

    you would have:

    =SUM(Start:End!E5)

    You can drag this across for: =SUM(Start:End!F5)
    and: =SUM(Start:End!G5)


    And don't use hard coded names such as:

    =SUMPRODUCT((('ENE 2012'!B5:B10="JENNIFER")*('ENE 2012'!C5:C10="SOTO")*('ENE 2012'!D5:D10)))

    Use:

    =SUMPRODUCT((('ENE 2012'!$B$5:$B$10=$B5)*('ENE 2012'!$C$5:$C$10=$C5)*('ENE 2012'!$D$5:$D$10)))


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sumifs across multiple worksheets

    Wow and it made some sense!

    The book ending idea is great, although couldn't I use

    =SUM(Ene 2012:Dic 2012!E5)

    The reason I put names in is because more students will be added through the year, so the names will change rows as the year progresses. Would this still work?

    Thanks again,


    John

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,542

    Re: Sumifs across multiple worksheets

    Yes, you could use existing workesheet names but, if you delete either of them it will break the formula. And, if you add sheets after the last one, it will not include them in the SUM. That's your choice though.

    If you use hard coded names, every formula is unique in that it can only relate to a specific person. If you use a cell reference, you can drag it down and it will automatically refer to the name on that row. It also means that there are no issues of formulae not working as you expect them to because you have spelt the name slightly differently. Again, your choice but you will make the spreadsheet very labour intensive. It's OK if you've only got a dozen or so rows, even up to 20,30, or 40. But, if you get into 100s and 1000s, it's going to get hard work. And, if someone edits the "visible" names in the workbook, for example, from Jane to Jayne, your formula will still work, it might just return 0.

  8. #8
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sumifs across multiple worksheets

    TMS,

    So this formula:

    =SUMPRODUCT((('ENE 2012'!$B$5:$B$10=$B5)*('ENE 2012'!$C$5:$C$10=$C5)*('ENE 2012'!$D$5:$D$10)))

    will only add the items on the 'Ene 2012' tab, do I have any options for adding across all the tabs?

    Thanks,


    John

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sumifs across multiple worksheets

    Have a look here:

    http://www.xl-central.com/sum-single...le-sheets.html

    you can use SUMIFS for multiple criteria in that formula....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,542

    Re: Sumifs across multiple worksheets

    I've applied the formula that NBVC has referenced. See attached workbook.

    Regards, TMS

  11. #11
    Registered User
    Join Date
    01-26-2012
    Location
    London
    MS-Off Ver
    Excel for Mac
    Posts
    40

    Re: Sumifs across multiple worksheets

    Big thanks again, I was even able to adapt it for a couple of other sheets I have!

    Take care,


    John

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,542

    Re: Sumifs across multiple worksheets

    You're welcome.

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sumifs across multiple worksheets

    You're Welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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