+ Reply to Thread
Results 1 to 9 of 9

Excel calculations across several sheets

  1. #1
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Excel calculations across several sheets

    The workbook attached contains match results from four football leagues in England i.e. premier league, championship, league one and league two. Assuming that a team can play in more than one league or even play in all the leagues (check highlighted teams i.e. Manchester united and Coventry), what would be the formula that will check all the leagues and return the number of matches played, games won, drawn or lost and the number of goals scored by a team and goals conceded in all the leagues?

    Some expected results are above the working table in the worksheet “calculations”. The formula should self-update as more matches are played and results added to the respective worksheets. The formula should only consider completed matches and ignore blank cells.

    Attachment 511074

  2. #2
    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: Excel calculations across several sheets

    I'd be inclined to put all your data on one sheet and analyse with a Pivot Table and Slicers.

    One suggestion is attached.
    Attached Files Attached Files
    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.

  3. #3
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Excel calculations across several sheets

    Thanks Richard, but the data has to be separated as it is and all math be done in the "calculations" sheet - there is a reason for that. I will also appreciate a formula that will do calculations for all the teams. I believe this can be achieved using sumproduct and sumif functions.

  4. #4
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Excel calculations across several sheets

    Note: Games played, Wins, Draws, Losses,Goals for and Goals against should be computed for individual teams. For example,I will want know how many matches Manchester United won,drew or lost at home, how many matches they drew while playing at home and how many matches they lost while playing at home.

  5. #5
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Excel calculations across several sheets

    Any of the teams can play in all the leagues at any time so the formulas in the "calculations" worksheet should link all the worksheets i.e. premier league, championship, league one and league two.
    Last edited by gko_87; 04-05-2017 at 11:56 PM.

  6. #6
    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
    30,878

    Re: Excel calculations across several sheets

    See attached: completed for "Manchester United" and "Coventry".

    Formula all of form ..

    =SUMPRODUCT(COUNTIF(INDIRECT("'"&Sheets&"'!$D:$D"),$B20))

    with COUNTIFS/SUMIFS as needed

    Named range "Sheets" is list of tabs.

    And I used the "helper" columns created by Richard in his post #2).
    Attached Files Attached Files
    Last edited by JohnTopley; 04-06-2017 at 07:56 AM.

  7. #7
    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: Excel calculations across several sheets

    Quote Originally Posted by Onditi View Post
    Thanks Richard, but the data has to be separated as it is and all math be done in the "calculations" sheet - there is a reason for that. I will also appreciate a formula that will do calculations for all the teams. I believe this can be achieved using sumproduct and sumif functions.
    It's still advisable to keep all your data on a single sheet whether you use a PT or not. Unless you do this you will have to concatenate four COUNTIFS/SUMIFS formula together.

    I've added a couple of rows of SUMIFS() and COUNTIFS formula. Note that spelling must be consistent. B11 for instance was originally Mcr Utd and not the full spelling that you had on the data sheets.

    And I think your example in row 4 is wrong. Those numbers are Manchester United not Manchester City.

    See attached
    Attached Files Attached Files
    Last edited by Richard Buttrey; 04-06-2017 at 05:25 AM.

  8. #8
    Forum Contributor
    Join Date
    09-13-2016
    Location
    Kenya
    MS-Off Ver
    Excel 2010
    Posts
    321

    Re: Excel calculations across several sheets

    Thanks Richard and John. I will review both files then come back here if I hit a rock. I also realized that as formulas increase, excel's calculating speed. Is there a way to make excel calculate faster?

  9. #9
    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
    30,878

    Re: Excel calculations across several sheets

    You could try defining the ranges rather have full columns. Normally with COUNTIF etc you normally don't need to do this, but as SUMPRODUCT is in the formula it may have any impact as with SUMPRODUCT you normally use a defined range.

    And the use of INDIRECT also has impact.

    You could avoid SUMPRODUCT by defining individual formulae and then adding these e.g =COUNTIF("Premier! .....)+COUNTIf(Championship!......)

    TESTED: changing the ranges from D:D, for example, to D2:D1000, significantly improved performance. (suggesting SUMPRODUCT is the "culprit"!).

    So I recommend you change all ranges D to L to a finite range
    Attached Files Attached Files
    Last edited by JohnTopley; 04-07-2017 at 03:11 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. calculations trough an undefined number of sheets
    By Watapana in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2013, 07:31 AM
  2. how to do calculations on multiple workbooks/sheets
    By captrain_cruncy in forum Excel General
    Replies: 1
    Last Post: 07-18-2011, 11:11 AM
  3. Excel 2007 : Data calculations between three sheets
    By ALEZI in forum Excel General
    Replies: 1
    Last Post: 07-21-2010, 05:14 AM
  4. Linking sheets multiple calculations
    By captain chaos in forum Excel General
    Replies: 2
    Last Post: 10-30-2009, 09:53 AM
  5. Making calculations using data from other sheets?
    By endlyss in forum Excel General
    Replies: 4
    Last Post: 06-27-2008, 04:00 PM
  6. [SOLVED] Iteration Calculations between sheets
    By Abraham.Olson@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2006, 12:10 PM
  7. Any way to get calculations over a range of two sheets?
    By foxspirit in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-07-2006, 05:12 PM
  8. Calculations crossing multiple sheets
    By Stephen McArthu in forum Excel General
    Replies: 4
    Last Post: 06-06-2005, 11:35 AM

Tags for this Thread

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