+ Reply to Thread
Results 1 to 4 of 4

Sum of totals from tables of varying size across multiple sheets

  1. #1
    Registered User
    Join Date
    11-14-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Question Sum of totals from tables of varying size across multiple sheets

    Hello,

    I currently have a problem with suming the costs from tables across multiple sheets where the tables are of varying size.

    Each sheet, 'sheet1' to 'sheet10' for simplicity sake, has a simple table consisting of two columns, 'Item' and 'Cost'. Each row contains a certain item and it's respective cost. The bottom of each table then has 'Total' in the item column and the sum of the total costs in the 'Cost' column.

    However, each table on each sheet has a varying number of rows. This means on 'sheet1' the total may be in B5 and on 'sheet2' it might be in B7.

    I need to sum all the total costs from 'sheet1' to 'sheet10' in a single cell.

    I tried using the =SUMIFS formula with a 3D Range but I discovered that you can't use this formula with a 3D Range.

    The only solution I could think of is to use a loop that goes through each sheet in turn, searches Column A for 'Total' and then adds the cell next to it to a running total. Is there a better way then this?

    Any help will be much appreciated!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,652

    Re: Sum of totals from tables of varying size across multiple sheets

    Could you use a 3D SUM formula on the entire column and divide by 2 to account for the Total formulas

    =SUM(Sheet1:Sheet10!B:B)/2
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    11-14-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Sum of totals from tables of varying size across multiple sheets

    Thank you very much!

    I should have known that I was over complicating it massively! Feel a bit stupud now!

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,652

    Re: Sum of totals from tables of varying size across multiple sheets

    Not at all. Fresh eyes sometimes helps.

+ 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. Replies: 4
    Last Post: 07-09-2012, 01:44 PM
  2. Averaging cells over a varying quantity of multiple sheets
    By rpm77 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-20-2010, 06:04 PM
  3. Copy Varying Range Sizes from Multiple Sheets to Main Sheet
    By Wester in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2010, 03:12 PM
  4. Column size will shrink every time when pivot tables are added into sheets
    By minrufeng in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2005, 07:39 PM
  5. Generic Page Setup Macro applied to multiple workbooks with varying number of sheets
    By sowetoddid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2005, 11:45 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