+ Reply to Thread
Results 1 to 3 of 3

Sum Across Variable Range of Sheets

  1. #1
    Registered User
    Join Date
    09-15-2010
    Location
    Richmond, CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Sum Across Variable Range of Sheets

    I’m trying to write a formula that sums the same cell in a variable range of sheets, where I can enter the names of beginning sheet and ending sheet of the range in cells to be used in the formula (simple example attached), i.e., something with the same result as:

    =Sum(Sheet1:Sheet3!A1)

    But where I can change Sheet1 and Sheet3 to the values in cells C1 and C2 (e.g., June 2010 and September 2010)

    It seems like something like this should work:
    =SUM(INDIRECT("'"&C1&"'!A1"):INDIRECT("'"&C2&"'!A1"))

    The closest I found from another forum is:

    =SUMPRODUCT(SUMIF(INDIRECT("'"&C1:C4&"'!A1"),"<>=0"))

    …but it only sums the first and last sheets, not the sheets in between. Does this require a macro?

    Thanks in advance for any advice….
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sum Across Variable Range of Sheets

    The only way I've been able to resolve this kind of INDIRECT() formula is to list all the sheets in a range somewhere, name that range of cells then use that in an array formula. See attached.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-15-2010
    Location
    Richmond, CA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Sum Across Variable Range of Sheets

    Thanks, Jerry. My boss is looking for something to avoid having to list all the sheets, since he will be adding them on an ongoing basis and wants to be able to sum different sheet ranges at different times. I'll run this by him, though. In the meantime, I'll leave the thread "unsolved" in case there are other suggestions....
    Thanks again!

+ 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