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!
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Watch MrExcel Video

Forum statistics

Threads
1,109,368
Messages
5,528,274
Members
409,813
Latest member
robyrux

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top