Using SumIf across worksheets to produce a table of "totals"

GriffinsPal

New Member
Joined
Apr 14, 2014
Messages
40
I have a workbook that has several worksheets. In each worksheet column C contains the month. I want to total certain data within a worksheet by month and copy it to a table in another worksheet within the workbook. Generally each worksheet has its own data type to be totaled, but there are some data types that are in more than one worksheet and I want the total for that data type to reflect the sum of that data across all the worksheets in which it appears. So in the first situation I think I would use something like this:
Code:
With Sheets("trainings")
                SumIf(c3:c150,1,Q3:Q150).copy sheets("totals").range H18

This would (I think) find all the rows in which column C contains a 1 (January), add the data in those rows that are found in column Q and then copy that sum into cell H18 in the Totals workbook.

1. I want to do this for every month (1-12) so is there a more concise way of doing that without copying this formula 11 more times?
2. Let's say I want to combine data from column Q in the "training" worksheet and column r from the "screening" worksheet into a single total in the "Totals" worksheet, should I create dummy (temporary) totals of from each worksheet and then add the two dummy totals and copy them to the "totals" page, or is there a better way of writing this?

thank you so much for your help!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top