+ Reply to Thread
Results 1 to 2 of 2

Retrieve values from multiple sheets and use VBA Sum to place total on Main Sheet

  1. #1
    Registered User
    Join Date
    11-06-2014
    Location
    Nashville, TN USA
    MS-Off Ver
    2013
    Posts
    19

    Retrieve values from multiple sheets and use VBA Sum to place total on Main Sheet

    Hello,

    I have a workbook with 7 sheets. 1 of the sheets is titled 'Metrics'. 4 of the sheets have a value in D3 that I would like to have added together and placed in C3 of the Metrics sheet. I'm open to placing a formula in the sheet and calling a function too but that didn't work so I moved to this method. I have tried many variations to sum. Here is my latest catastrophe. Any idea how to resolve it?

    This VBA is on the metrics sheet.
    Sub TotalTestCases(Range)
    Dim ws As Worksheet
    Dim SumTotal As Long

    For Each ws In ThisWorkbook.Worksheets
    If ws.Name <> "Metrics" And ws.Name <> "TFSData" And ws.Name <> "TFSBugs" Then
    SumTotal = WorksheetFunction.Sum(ws.Range("D3"))
    Metrics!C3 = SumTotal

    End If
    Next ws

    End Sub

  2. #2
    Registered User
    Join Date
    11-06-2014
    Location
    Nashville, TN USA
    MS-Off Ver
    2013
    Posts
    19

    Re: Retrieve values from multiple sheets and use VBA Sum to place total on Main Sheet

    oh, and I would like them to automatically update if the value on one of the sheets change

+ 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. Main sheet populated by multiple sheets, dynamic ranges
    By cmack in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2014, 09:14 AM
  2. Populate data from one main sheet to multiple sheets
    By dfulmer in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-31-2012, 05:24 PM
  3. Replies: 8
    Last Post: 02-13-2012, 06:35 PM
  4. Replies: 0
    Last Post: 01-23-2012, 02:49 PM
  5. Searching for data across multiple sheets and copying to one main sheet
    By truedonk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-24-2008, 08:13 AM

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