+ Reply to Thread
Results 1 to 1 of 1

Macro to sum the product of multiple cells across multiple worksheets

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    SLC, UT
    MS-Off Ver
    Excel 2010
    Posts
    12

    Macro to sum the product of multiple cells across multiple worksheets

    I first posted this question looking for a formula but got no answers and, the more I have read, the more it looks like a formula can't do this. Is there a macro that can accomplish what I am looking for?

    I have a workbook that has multiple worksheets - one for an original contract bid and an additional worksheet for each change order, plus a summary page (for the attached sample, there are only two change orders so only three worsheets that need to be included in the summary, but there may be as many as a hundred or more change orders for a project).

    I have everything set to summarize correctly *except* the quantities/hours.
    For example, the "Original Contract" sheet for FX 6 (see column A) for conference room chairs has a quantity of 8 (C14), executive chairs a quantity of 1 (C15), and reception area chairs a quantity of 4 (C16). There are material costs, sales tax, and department hours assigned to each chair type (side, executive, reception).
    The "Change Order 1" sheet has added 2 more reception area chairs, each of which has a material cost, sales tax amount, and department hours.

    I have the "Contract Summary" worksheet set up to look at each sheet in my SheetList and sum the quantities, costs, taxes, and hours; however, I need it to multiply the quantity by the costs and hours and THEN sum them.
    So, I need it to look at "Original Contract" and find the product of the quantities in column C and the costs or hours in columns D, E, F, G, H, I, J, K, L, M (rows 2:76).

    My current formula looks like this: =SUMPRODUCT(SUMIF(INDIRECT("'"&SheetList&"'!A2:A76"),A2,INDIRECT("'"&SheetList&"'!D2:D76")))
    It adds everything up, but I need the sumproduct(C2:C76,D2:D76) if A2:A76 in the SheetList matches the value in Column A in the Original Contract and then those values should be added together.
    Attached Files Attached Files

+ 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