+ Reply to Thread
Results 1 to 5 of 5

Dynamic total of sheets with common sheetname

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    226

    Dynamic total of sheets with common sheetname

    I have a workbook with several sheets and a total-sheet. The single sheets are named like shown below. The will always start with 1, 2 or 3, but there can be several sheets within the categories. In the example are there three sheets within the 2-category.

    Please Login or Register  to view this content.
    I need a total of the values in A1 in the example. Any idea about a dynamic formula which will always include new sheets within a category.
    Attached Files Attached Files
    Last edited by mkvassh; 01-17-2011 at 10:37 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,528

    Re: Dynamic total of sheets with common sheetname

    There's no truly dynamic way of doing this using formulae alone I'm afraid - you would need to use some XLM/VBA type approach to generate the requisite listing(s) dynamically.

    I would say that a basic UDF would probably suffice though you would be obliged to make it Volatile.

    Assuming you the Function will reside within the same workbook as the data:

    Please Login or Register  to view this content.
    Called along the lines of:

    Please Login or Register  to view this content.
    Obviously the above is very basic but gives you one possible route - there are plenty of alternatives but the above is pretty straightforward I think.

    Whichever way you go you're looking at a Volatile approach I'm afraid.

    Another alternative would be to keep a Table detailing results by sheet and then use basic SUMIF calls to calculate final numbers based off the single contiguous table.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,528

    Re: Dynamic total of sheets with common sheetname

    Attached is a version which contains both aforementioned UDF and some alternative formula driven approaches - use whichever seems most appropriate.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-02-2007
    Location
    Bryne, Norway
    MS-Off Ver
    Microsoft Office Excel 2010
    Posts
    226

    Re: Dynamic total of sheets with common sheetname

    Thanks a lot DonkeyOte. I will use your UDF-suggestion and keep this function in a xla-file, since it will be used in several workbooks.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,528

    Re: Dynamic total of sheets with common sheetname

    In which case be sure to modify the Objects appropriately, eg:

    Please Login or Register  to view this content.
    as opposed to:

    Please Login or Register  to view this content.

+ 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