+ Reply to Thread
Results 1 to 3 of 3

sum multiple sheets based on condition

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    sum multiple sheets based on condition

    I need help, I have 12 months of data, each in a separate tab. I have a summary tab summing all the months. for example in cell C7 of the summary tab it sums all the months Jan-Dec C7's. But I want to condition this information. I want to enter "from" and "to" months on my summary tab and have it sum just those months.

    so for example if on the summary tab
    "From" cell A1 = Jan and
    "To" cell A2 = Feb
    in the summary tab's cell C7 it sums Jan C7 + Feb C7.


    But if
    A1 = Jan and
    A2 = Mar
    in the summary tabs cell C7 it sums Jan C7 + Feb C7 + Mar C7

    is this possible? please help. Thanks.

  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: sum multiple sheets based on condition

    Hi,

    The first choice would have been an INDIRECT() function but Excel has trouble when using the INDIRECT function with 3D ranges as you are doing here. The only way I know is as follows.

    Create a list of your month tab names, presumably Jan,Feb,Mar etc.. in say A5:A16.
    Now create a dynamic range name called 'SheetList' and define the name as
    Please Login or Register  to view this content.
    In B1 enter
    Please Login or Register  to view this content.
    and copy this to B2. These will return the month number.

    Finally in C7 enter the following array formula, i.e. with Ctrl-Shift-Enter

    Please Login or Register  to view this content.
    See the attached as an example workbook
    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
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: sum multiple sheets based on condition

    yes, that worked perfectly, thanks Richard!

    Only issue is you can't carry over the formula to the next cell and it adjusts to the next cell, you have to manually type the next cell. "C7" remains C7 when copied into C8. Did it manually, but would like it to change based on inseerting and deleting lines. Thanks for your help.

+ 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