+ Reply to Thread
Results 1 to 20 of 20

Summing accross sheets

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Summing accross sheets

    Hi,

    I would like a formula which pulls in data across a number of sheets and returns it to the summary sheet.

    Ideally I would like a formula to look across all workbooks and then match the following:
    The Network name from column K
    “Cost” with row 6
    “Overall Result” in row 3

    This is because the total are in different columns in different sheets.

    Can sumproduct be used with a named ranged?

    The obvious thing for me to do is to change and fix the total column on each sheet but this isn’t possible.

    Can anyone help

    Summing across sheets
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Summing accross sheets

    Hi there. Yes, this is perfectly do-able. I've created a dynamic range (imaginatively called LIST) on sheet1 which drives the whole thing. Just add sheet names to the list and it'll expand to cope.

    See attached sheet.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Summing accross sheets

    Quote Originally Posted by Glenn Kennedy View Post
    Hi there. Yes, this is perfectly do-able. I've created a dynamic range (imaginatively called LIST) on sheet1 which drives the whole thing. Just add sheet names to the list and it'll expand to cope.

    See attached sheet.
    Hi Glen,
    I think the op is asking for Overall Result Cost and Hours total from each sheet which are in the last columns
    Like Sum=(North!AF7,Central!AH7) and sum(North!AG7,Central!AI7)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Summing accross sheets

    Hi Glen

    thanks for taking a look at this.

    Silva has posted before me but they are correct, it would need to be the total column if possible, not just column M and L

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Summing accross sheets

    Hi.

    You've posted a macro-enabled workbook though in the Excel General subforum. Are you looking specifically for a VBA solution to this?

    Regards
    Click * below if this answer helped

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

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Summing accross sheets

    nflsales, you're probably right... I didn't go that far over...

    Pauldaddyadams, is it intentional that the total columns on the two sheets are in different columns (AF & AG in North; AH & AI in central). If they can be harmonised, a simple modification of my solution will work.
    Attached Files Attached Files

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Summing accross sheets

    Quote Originally Posted by pauldaddyadams View Post
    Hi Glen

    thanks for taking a look at this.

    Silva has posted before me but they are correct, it would need to be the total column if possible, not just column M and L
    Is it ok for you, if the totals columns brings after Column K, Then it will be unique for all the sheets and your problem will be solved.

  8. #8
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Summing accross sheets

    Hi,

    No, not at all. It doesnt need to be VBA.

    The total column position will be different on each sheet. When the report is run and pasted into the model in future it could be in a completly different column.

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: Summing accross sheets

    What is the problem if the totals columns brings after Column K like attached file
    Attached Files Attached Files

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Summing accross sheets

    I can't think of any way to do this... IF the position of the totals column can be standardised (ae.g. as nflsales suggested) after column K - it's easy. Otherwise, i don't immediately know what to do.

  11. #11
    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: Summing accross sheets

    Quote Originally Posted by pauldaddyadams View Post
    Hi,


    The obvious thing for me to do is to change and fix the total column on each sheet but this isn’t possible.

    Why is that? You would simplify things considerably if your total row was always on the same row above the data. I'm constantly surprised when I see totals rows at the foot of tables especially when different sheets have different numbers of rows.

    This is reminiscent of the old pencil and paper days (pre 1978 !) when totals were traditionally at the bottom. Now we're in a digital age this makes no sense whatsoever and I always wonder why spreadsheets continue to reflect this.
    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.

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Summing accross sheets

    This can be done even if the totals are in different columns in each worksheet.

    However, apologies for asking this, though I would kindly ask that you re-attach your workbook with several, manually-calculated desired results added, just so I know what I'm aiming for.

    Regards

  13. #13
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Summing accross sheets

    Sorry for the delay in replying.

    I have reattached the model as requested with sample results.

    I could reposition the data to how you have all described but this would involve me having to manually manipluate each sheet. I have 10 sheets I would need to do this for on a daily basis so it would be time consuming. The source report itselef I download from SAP I could request that the total columns are moved to where you suggested but this would take weeks and I would have to jump through hoops to get the change accepted. I will have to do this if there isnt a solution.
    Attached Files Attached Files

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Summing accross sheets

    Thanks.

    A few questions:

    1) In each of the sheets in question, although the column to be referenced may be different, will it nevertheless always be headed "Overall Result"? And will these headers, in all sheets, appear in merged cells in rows 3-5?

    2) Do the calculations need to match on the Network Name? In your workbook it would appear that this data is always in the same row in each sheet: "Test 1", for example, is in row 7 in all of the Summary, North and Central tabs. If this is the case with all such strings then no matching will be necessary.

    3) It may be necessary to set the formulas to calculate over a number of rows which is sufficiently large to cover all sheets involved. Can you give a suitably (though obviously not unnecessarily) large upper bound on this number?

    Regards

  15. #15
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Summing accross sheets

    Hi,

    1. Yes - it will always be called overall result and the merged cells will be the same.
    2. The names will always be the same in each sheet. e.g. Test1 will always be in the same row of each sheet.
    3. I do not understand point 3?

    Paul

  16. #16
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Summing accross sheets

    Quote Originally Posted by pauldaddyadams View Post
    Hi,

    1. Yes - it will always be called overall result and the merged cells will be the same.
    2. The names will always be the same in each sheet. e.g. Test1 will always be in the same row of each sheet.
    3. I do not understand point 3?

    Paul
    Apologies for not being clear. Basically, what is the largest row number containing data you ever envisage having across all of your sheets?

    Regards

  17. #17
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Summing accross sheets

    Oh, well currently its row 457 but I can see that growing overtime to 500.

  18. #18
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Summing accross sheets

    Thanks.

    First go to Name Manager (Formulas tab) and define:

    Name: Sheets
    Refers to: ={"North","Central"}

    (Or whatever happen to be the relevant sheet names in question.)

    The formula in cell L7 of the Summary tab is then:

    =SUMPRODUCT(SUMIFS(INDIRECT("'"&Sheets&"'!"&ROWS($1:7)&":"&ROWS($1:7)),INDIRECT("'"&Sheets&"'!3:3"),"Overall Result",INDIRECT("'"&Sheets&"'!6:6"),"Cost"))

    Copy down as required.

    The formula is identical for cell M7, apart from "Cost" at the end becoming "Hours".

    Note that the 7 in the ROWS($1:7) part is designed so that the formula in row 7 of the Summary sheet references that row in each of the sheets in question. As this formula is copied down, this part becomes, successively:

    ROWS($1:8) (and so the formula references row 8 in each of the sheets in question)

    ROWS($1:9) (and so the formula references row 9 in each of the sheets in question)

    etc., which was made possible by your confirming that the Network Name will always be in the same row in all of the sheets, including Summary.

    My question re an upper row limit in the end turned out not to be a concern using this set-up.

    Regards

  19. #19
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,702

    Re: Summing accross sheets

    Hi XOR

    This worked - thank you for providing this formula! It will be a massive help for me!

  20. #20
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Summing accross sheets

    You're welcome!

    Edit: thanks for the PM - tried to reply but your inbox is full!

    Cheers

+ 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 Accross Mult Sheets
    By day92 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-26-2014, 04:10 PM
  2. Summing Accross multiple worksheets
    By rbiamonte in forum Excel General
    Replies: 8
    Last Post: 06-02-2010, 04:37 PM
  3. Summing Values accross multiple sheets
    By randell.graybill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2009, 05:17 AM
  4. Summing accross multiple tabs for specific fields
    By doug2 in forum Excel General
    Replies: 2
    Last Post: 09-11-2007, 10:58 AM
  5. Summing accross sheets
    By babycody in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2005, 08:35 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