+ Reply to Thread
Results 1 to 5 of 5

Totals Across Mutliple Sheets...

  1. #1
    Registered User
    Join Date
    09-05-2013
    Location
    Concord, NH
    MS-Off Ver
    Excel 2000
    Posts
    3

    Totals Across Mutliple Sheets...

    Using Excel 2000 with WinXP.
    Must see attached for example.

    GOAL:
    To sum all "Total Area" values for each "Item #" from each sheet onto a separate Summary Sheet and being able to add more sheets on an ongoing basis.

    You'll need to view summary sheet to get the gist of what I am trying to do.
    The sheets do not necessarily need to be broken out into rows on the summary sheet, as long as the totals on the summary sheet are updated automatically whenever I change the "total area" value on any of the sheets.
    I would like to add many more sheets but can't see how to do this without manually changing formula in each cell. I did it for the first one but kinda got stumped after that. I thought I could "sumif" across multiple sheets but from my trials and research, this does not appear to be an option.

    Alternative:
    On the summary sheet, I have also looked at the option of implementing "indirect" somehow, to drag ROW 2 down having the sheet number change only, but after many attempts, I am stumped on how to do this. This would be acceptable if the above is not an option. This way, I thought I could just drag down ROW 2 to increment the sheet numbers oNLY in the formula accordingly to as many rows as I needed.

    Any help including alternative options would be greatly appreciated.

    Thanks in advance,
    Geo.
    Attached Files Attached Files

  2. #2
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Totals Across Mutliple Sheets...

    Hi Geo,

    Welcome to the forum

    This can be done through Indirect function.
    In the attached sheet you put the correct sheet nos. in col C and the item # in row 1. The ranges are calculated in col A and B through formulas.
    Whenever you add new sheets add the sheet name in col C and drag the formula down. Drag the formula to right if you add new item nos.
    **You have to change the data range manually in columns A and B

    Thanks,
    Bhuvi

    <If my answer helped, please click on the Star* below to add some reputation>
    Attached Files Attached Files
    Last edited by Bhuvi; 09-06-2013 at 10:55 AM. Reason: more info added**

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Totals Across Mutliple Sheets...

    Hi Geo

    If you're interested in a Macro solution try the Code in the attached. There's a Button on Sheet SUMMARY that does initial setup for all existing sheets including the appropriate Formulas. You need run this only once (unless you wish to start over)

    After you've run Initial Setup, there's Change Event Code that adds new sheets to Sheet SUMMARY when you make a change to the new sheet.

    The Code is as follows...
    Please Login or Register  to view this content.
    Option Explicit

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Dim ws As Worksheet, ws1 As Worksheet
    Dim Rng As Range, sName As Range
    Dim LR As Long

    If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
    If Not Target.Column = 1 Then Exit Sub
    Set ws = Sheets("SUMMARY")

    With ws
    LR = .Range("A" & .Rows.Count).End(xlUp).Row
    Set Rng = .Range("A2:A" & LR)
    Set sName = Rng.Find(ActiveSheet.Name, , xlValues, xlWhole, xlByRows, xlNext, False)
    If sName Is Nothing Then
    Application.EnableEvents = False
    .Rows(LR + 1).EntireRow.Insert
    .Range("A" & LR + 1).Value = ActiveSheet.Name
    Set ws1 = ActiveSheet

    For i = 1 To 9
    .Cells(LR + 1, i + 1).Formula = "=SUMIF(" & ws1.Name & "!$A$6:$A$68," & i & "," & ws1.Name & "!$O$6:$O$68)"
    Next i
    Application.EnableEvents = True
    End If
    End With
    Set sName = Nothing
    End Sub
    [/CODE]
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    09-05-2013
    Location
    Concord, NH
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: Totals Across Mutliple Sheets...

    Bhuvi,

    Thank you so much for your help. It appears to work fine, however I won't be able to put it to the test for a few days. I very much appreciate your time for helping me. It's nice to know there are kind people willing to help in this crazy world today.

    Thanks,
    Geo.

    .
    Quote Originally Posted by geo.nova View Post
    Using Excel 2000 with WinXP.
    Must see attached for example.

    GOAL:
    To sum all "Total Area" values for each "Item #" from each sheet onto a separate Summary Sheet and being able to add more sheets on an ongoing basis.

    You'll need to view summary sheet to get the gist of what I am trying to do.
    The sheets do not necessarily need to be broken out into rows on the summary sheet, as long as the totals on the summary sheet are updated automatically whenever I change the "total area" value on any of the sheets.
    I would like to add many more sheets but can't see how to do this without manually changing formula in each cell. I did it for the first one but kinda got stumped after that. I thought I could "sumif" across multiple sheets but from my trials and research, this does not appear to be an option.

    Alternative:
    On the summary sheet, I have also looked at the option of implementing "indirect" somehow, to drag ROW 2 down having the sheet number change only, but after many attempts, I am stumped on how to do this. This would be acceptable if the above is not an option. This way, I thought I could just drag down ROW 2 to increment the sheet numbers oNLY in the formula accordingly to as many rows as I needed.

    Any help including alternative options would be greatly appreciated.

    Thanks in advance,
    Geo.

  5. #5
    Registered User
    Join Date
    09-05-2013
    Location
    Concord, NH
    MS-Off Ver
    Excel 2000
    Posts
    3

    Re: Totals Across Mutliple Sheets...

    Jaslake,

    Wow. That is so cool! I've always wanted to work with excel macros as I know they can do amazing things but I've been stuck in the CAD world for so long. I really appreciate your taking the time to help out. It's wonderful to see that there are people willing to help out in this crazy world today. I'm anxious to try this once I get the rest of my data.

    Thanks immensley,
    Geo.


    Quote Originally Posted by jaslake View Post
    Hi Geo

    If you're interested in a Macro solution try the Code in the attached. There's a Button on Sheet SUMMARY that does initial setup for all existing sheets including the appropriate Formulas. You need run this only once (unless you wish to start over)

    After you've run Initial Setup, there's Change Event Code that adds new sheets to Sheet SUMMARY when you make a change to the new sheet.

    The Code is as follows...
    Please Login or Register  to view this content.
    Option Explicit

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Dim ws As Worksheet, ws1 As Worksheet
    Dim Rng As Range, sName As Range
    Dim LR As Long

    If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
    If Not Target.Column = 1 Then Exit Sub
    Set ws = Sheets("SUMMARY")

    With ws
    LR = .Range("A" & .Rows.Count).End(xlUp).Row
    Set Rng = .Range("A2:A" & LR)
    Set sName = Rng.Find(ActiveSheet.Name, , xlValues, xlWhole, xlByRows, xlNext, False)
    If sName Is Nothing Then
    Application.EnableEvents = False
    .Rows(LR + 1).EntireRow.Insert
    .Range("A" & LR + 1).Value = ActiveSheet.Name
    Set ws1 = ActiveSheet

    For i = 1 To 9
    .Cells(LR + 1, i + 1).Formula = "=SUMIF(" & ws1.Name & "!$A$6:$A$68," & i & "," & ws1.Name & "!$O$6:$O$68)"
    Next i
    Application.EnableEvents = True
    End If
    End With
    Set sName = Nothing
    End Sub
    [/CODE]

+ 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. Option Button and Mutliple Sheets Help
    By ceejay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2012, 01:07 AM
  2. Totals across 16 sheets
    By JuJuBe in forum Excel General
    Replies: 6
    Last Post: 04-11-2011, 10:15 AM
  3. finding data from mutliple sheets
    By martin.mcgarry in forum Excel General
    Replies: 11
    Last Post: 10-19-2010, 11:16 AM
  4. INDEX array not working over mutliple sheets
    By nhojflies in forum Excel General
    Replies: 2
    Last Post: 03-19-2010, 12:35 PM
  5. Auto filling cells across mutliple sheets
    By Alec H in forum Excel General
    Replies: 5
    Last Post: 02-06-2006, 10:39 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