+ Reply to Thread
Results 1 to 16 of 16

Combine Multiple Sheets to One and Perform Calculation

  1. #1
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241

    Combine Multiple Sheets to One and Perform Calculation

    I have a workbook with several sheets organized by month/year (Nov23, Dec23, Jan24, etc.).
    Column N will have a totaled value at the end of last row.

    I'd like to consolidate these various sheets into a single sheet called MasterSheet so that as new months are introduced, I only have to maintain one MasterSheet.
    I have a Dashboard sheet that will summarize the sum of based on the year/month.
    How can I have the Dashboard sheet to check for Year/Month (From MasterSheet) and provide the sum automatically?

    Please see attached file the sample file.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    Are you still working with Excel 2016?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241

    Re: Combine Multiple Sheets to One and Perform Calculation

    Yes. I am still using Excel 2016 and going to purchase Office 2019 or 365 when I buy a new laptop next month.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    Get 365 - it's much better and will make things like this really simple.

    So, to summarise: you want the entire dashboard table to auto-generate - is this it?

  5. #5
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241
    Okay, I will purchase 365. Thanks.
    Yes, I want the dashboard to be automated.
    Last edited by AliGW; 11-01-2023 at 06:56 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    Okey-dokey. Not so easy with Excel 2016, but I'll have a look (as I am sure will others here).

  7. #7
    Forum Contributor
    Join Date
    08-31-2021
    Location
    Kassel, Germany
    MS-Off Ver
    365 v2308
    Posts
    187

    Re: Combine Multiple Sheets to One and Perform Calculation

    Sounds to me like an easy job with Power Query, and I agree with Ali that Excel 365 is so worth it.

  8. #8
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241
    How can I do it in power query?
    Last edited by AliGW; 11-01-2023 at 10:02 AM. Reason: Please do NOT quote unnecessarily! Use the QUICK REPLY button instead.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    Will that total cell always be in the same place on every sheet?

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    Here's a formula solution.

    In Name Manager, create an item called SheetNames:

    =REPLACE(GET.WORKBOOK(1),1,FIND("]",GET.WORKBOOK(1)),"")

    Then, in C6:

    =ROWS(C$6:C6)

    and in D6:

    =2000+INDEX(RIGHT(SheetNames,2),C6+2)

    and in E6:

    =INDEX(LEFT(SheetNames,3),C6+2)

    and in F6:

    =SUMIF(Table26[Month],[@Month],Table26[Total Consumption])
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241

    Re: Combine Multiple Sheets to One and Perform Calculation

    Thanks, AliGW.
    It solved.

    I suppose the same formula can also be used in 365 or 365 will have another formula to perform the same function. Thanks you so much.

  12. #12
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241

    Re: Combine Multiple Sheets to One and Perform Calculation

    By the way, I just realized that 2023 and 2024 are combined in the Total Consumption calculation. i.e., the data for December 2023 and December 2024 will be combined rather than displayed as separate rows.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    OK - so provide a more rea;istic sample dataset and I'll have a look again for you.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    You could see if this works:

    =SUMPRODUCT((Table26[Month]=[@Month])*(YEAR(Table26[Date])=[@Year])*IF(Table26[Total Consumption]="",0,Table26[Total Consumption]))

  15. #15
    Forum Contributor
    Join Date
    02-23-2015
    Location
    SG
    MS-Off Ver
    MS Excel 2019 & 365
    Posts
    241

    Re: Combine Multiple Sheets to One and Perform Calculation

    Thanks, AliGW.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Combine Multiple Sheets to One and Perform Calculation

    No problem.

+ 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] Formula to meet multiple criteria and perform calculation
    By rakeshgarg1977 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-03-2016, 07:07 AM
  2. Perform calculation on multiple matches ... where to start?
    By GraysonRobbins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2016, 01:20 PM
  3. [SOLVED] Formula to Lookup Multiple Criteria in Two Worksheets and perform a Calculation v2
    By hammer2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-04-2015, 12:34 AM
  4. [SOLVED] Formula to Lookup Multiple Criteria in Two Worksheets and perform a Calculation
    By hammer2 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-03-2015, 02:30 AM
  5. How to perform calculation for multiple columns and rounding off using macro
    By raja15feb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2014, 04:03 AM
  6. VBA - Combine Duplicate Rows into One and perform calculation
    By polinew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2013, 02:30 PM
  7. [SOLVED] Select multiple independent cells and perform a calculation
    By mtsykes28 in forum Excel General
    Replies: 18
    Last Post: 07-06-2012, 06:38 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