+ Reply to Thread
Results 1 to 9 of 9

sum automatically between chosen worksheets

Hybrid View

  1. #1
    Registered User
    Join Date
    09-08-2011
    Location
    surabaya,indonesia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Smile sum automatically between chosen worksheets

    Can anyone help me how to sum same cell between chosen worksheets? let say i have 32 sheets in a workbook, named output, 1,2,3,4,5,6,7,8,......,31. On the "output" sheet, the result of the sum i want to have it on A2 cell. A1 and B1 are the cells where can i type which sheets to be calculated. let say if i enter 3 on A1 and 8 on B1, the result on cell A2 is the sum of a cell between sheet 3 to sheet 8. Thanx for the help.

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: sum automatically between chosen worksheets

    Welcome to the forum, this as an array may help. Note that it only works if the sheets are sorted in order (1,2,3,4... and not 1,3,2,4...). If they are not in order then you need to do a bit of more work.

    =SUM(N(INDIRECT(ROW(INDIRECT(A1&":"&B1))&"!A1")))
    Confirm with Ctrl + Shift + Enter

    Note: INDIRECT does not seem to support 3D formulas, hence the above.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Registered User
    Join Date
    09-08-2011
    Location
    surabaya,indonesia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: sum automatically between chosen worksheets

    Quote Originally Posted by ron2k_1 View Post
    Welcome to the forum, this as an array may help. Note that it only works if the sheets are sorted in order (1,2,3,4... and not 1,3,2,4...). If they are not in order then you need to do a bit of more work.

    =SUM(N(INDIRECT(ROW(INDIRECT(A1&":"&B1))&"!A1")))
    Confirm with Ctrl + Shift + Enter

    Note: INDIRECT does not seem to support 3D formulas, hence the above.
    Thanx a lot Ron2k. what a fast reply. i have tried your formula n it seems, it doesn't calculated all. it only calculate the first sheet only. when i enter 1 on A1 and 2 on B1, the result is only the number on sheet "1" only. no matter what number i enter on B1, it shows the same result.

    Please help me on this.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: sum automatically between chosen worksheets

    If I understand what you are trying to do, sum all the A1 cells in 31 sheets.

    Try: =SUM(Sheet1:Sheet31!A1)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: sum automatically between chosen worksheets

    Quote Originally Posted by alansidman View Post
    If I understand what you are trying to do, sum all the A1 cells in 31 sheets.

    Try: =SUM(Sheet1:Sheet31!A1)
    I guessing he wants a dynamic 3D formula, which forces you to use INDIRECT. But this formula will give you an #REF if you write it like this:
    =SUM(INDIRECT("'"&A1&":"&B1&"'!A1"))
    You will need an array similar to mines if you want to accomplish what he wants. Sum from the sheet number he inputs in A1 to the sheet number he enters in B2.

  6. #6
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: sum automatically between chosen worksheets

    It is an array formula which means that you just can't press Enter when entering the formula. Do this:

    1. Copy the formula I gave you
    2. Go to excel, Cell A2, and click on the formula bar, and paste there
    3. Press and hold Ctrl and Shift, and while holding those press Enter.

  7. #7
    Registered User
    Join Date
    09-08-2011
    Location
    surabaya,indonesia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Thumbs up Re: sum automatically between chosen worksheets

    Thankx ron2k. thanks a lot. you really make my life easier. it solved work well. really thank you to you.

  8. #8
    Registered User
    Join Date
    09-08-2011
    Location
    surabaya,indonesia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Thumbs up Re: sum automatically between chosen worksheets

    how to mark this thread as solved? i dont know how. hahaha. really happy beacuse your help, ron2k.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: sum automatically between chosen worksheets

    To mark your thread solved do the following: - Go to the first post - Click edit - Click Advance - Just below the word "Title:" you will see a dropdown with the word No prefix. - Change to Solve - Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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