using sumifs function across multiple sheets

jbrown021286

Board Regular
Joined
Mar 13, 2023
Messages
81
Office Version
  1. 365
Platform
  1. Windows
i have a sumifs function that i need to to also add cells that match the same criteria from other worksheets
TECH HOURS WORKSHEET 2.0 tester.xlsx
ABCDE
111-Feb17-Feb
2
3
4
5
6101502101549103642
7JeffJustinRamy
8hours24.8037.8
9
10
11
12
13
Hours
Cell Formulas
RangeFormula
A1A1=WORKDAY.INTL(B1+1,-1,"1111110")
C8C8=SUMIFS('Aggregated Data'!C4:AG4,'Aggregated Data'!C3:AG3,">="&A1,'Aggregated Data'!C3:AG3,"<="&B1)
D8D8=SUMIFS('Aggregated Data'!C5:AG5,'Aggregated Data'!C3:AG3,">="&A1,'Aggregated Data'!C3:AG3,"<="&B1)
E8E8=SUMIFS('Aggregated Data'!C6:AG6,'Aggregated Data'!C3:AG3,">="&A1,'Aggregated Data'!C3:AG3,"<="&B1)

this is the output of the formula that i am using
TECH HOURS WORKSHEET 2.0 tester.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1Tech Hours
2 01FEB24 02FEB24 03FEB24 04FEB24 05FEB24 06FEB24 07FEB24 08FEB24 09FEB24 10FEB24 11FEB24 12FEB24 13FEB24 14FEB24 15FEB24 16FEB24 17FEB24 18FEB24 19FEB24 20FEB24 21FEB24 22FEB24 23FEB24 24FEB24 25FEB24 26FEB24 27FEB24 28FEB24 29FEB24
31-Feb2-Feb3-Feb4-Feb5-Feb6-Feb7-Feb8-Feb9-Feb10-Feb11-Feb12-Feb13-Feb14-Feb15-Feb16-Feb17-Feb18-Feb19-Feb20-Feb21-Feb22-Feb23-Feb24-Feb25-Feb26-Feb27-Feb28-Feb29-Feb
4Jeff1015021.19.922.5 8.422.014.20.317.513.9 7.48.04.64.8                
5Justin1015492.020.04.0 6.510.45.25.23.013.8                     
6Ramy10364211.26.23.5  15.15.09.411.69.5 1.415.811.09.6                
7Tuzzo1071327.17.48.9 10.53.53.911.23.95.0 2.32.88.88.0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TH!$E:$E,B4,RTH!$B:$B,U$2)
V4:V7V4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,V$2)
W4:W7W4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,W$2)
X4:X7X4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,X$2)
Y4:Y7Y4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,Y$2)
Z4:Z7Z4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,Z$2)
AA4:AA7AA4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AA$2)
AB4:AB7AB4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AB$2)
AC4:AC7AC4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AC$2)
AD4:AD7AD4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AD$2)
AE4:AE7AE4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AE$2)
AF4:AF7AF4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AF$2)
AG4:AG7AG4=SUMIFS(RTH!$N:$N,RTH!$E:$E,B4,RTH!$B:$B,AG$2)

this is the original range that i am adding together but i also need to be able to add from multiple sheets that hold similar data that are just going to be previous months of the data seen here. basically at the end of each month i will be coping the worksheet and pasting it into a new tab for what ever month it was for titling them Jan, Feb, Mar and so on then clearing the data out of this worksheet to start the new month

TECH HOURS WORKSHEET 2.0 tester.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1Tech Hours
2 01FEB24 02FEB24 03FEB24 04FEB24 05FEB24 06FEB24 07FEB24 08FEB24 09FEB24 10FEB24 11FEB24 12FEB24 13FEB24 14FEB24 15FEB24 16FEB24 17FEB24 18FEB24 19FEB24 20FEB24 21FEB24 22FEB24 23FEB24 24FEB24 25FEB24 26FEB24 27FEB24 28FEB24 29FEB24
31-Feb2-Feb3-Feb4-Feb5-Feb6-Feb7-Feb8-Feb9-Feb10-Feb11-Feb12-Feb13-Feb14-Feb15-Feb16-Feb17-Feb18-Feb19-Feb20-Feb21-Feb22-Feb23-Feb24-Feb25-Feb26-Feb27-Feb28-Feb29-Feb
4Jeff1015021.19.922.508.42214.20.317.513.907.484.64.80000000000000000
5Justin101549220406.510.45.25.2313.8000000000000000000000
6Ramy10364211.26.23.50015.159.411.69.501.415.8119.60000000000000000
Jan


TECH HOURS WORKSHEET 2.0 tester.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1Tech Hours
2 01FEB24 02FEB24 03FEB24 04FEB24 05FEB24 06FEB24 07FEB24 08FEB24 09FEB24 10FEB24 11FEB24 12FEB24 13FEB24 14FEB24 15FEB24 16FEB24 17FEB24 18FEB24 19FEB24 20FEB24 21FEB24 22FEB24 23FEB24 24FEB24 25FEB24 26FEB24 27FEB24 28FEB24 29FEB24
31-Feb2-Feb3-Feb4-Feb5-Feb6-Feb7-Feb8-Feb9-Feb10-Feb11-Feb12-Feb13-Feb14-Feb15-Feb16-Feb17-Feb18-Feb19-Feb20-Feb21-Feb22-Feb23-Feb24-Feb25-Feb26-Feb27-Feb28-Feb29-Feb
4Jeff1015021.19.922.508.42214.20.317.513.907.484.64.80000000000000000
5Justin101549220406.510.45.25.2313.8000000000000000000000
6Ramy10364211.26.23.50015.159.411.69.501.415.8119.60000000000000000
Feb


TECH HOURS WORKSHEET 2.0 tester.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1Tech Hours
2 01FEB24 02FEB24 03FEB24 04FEB24 05FEB24 06FEB24 07FEB24 08FEB24 09FEB24 10FEB24 11FEB24 12FEB24 13FEB24 14FEB24 15FEB24 16FEB24 17FEB24 18FEB24 19FEB24 20FEB24 21FEB24 22FEB24 23FEB24 24FEB24 25FEB24 26FEB24 27FEB24 28FEB24 29FEB24
31-Feb2-Feb3-Feb4-Feb5-Feb6-Feb7-Feb8-Feb9-Feb10-Feb11-Feb12-Feb13-Feb14-Feb15-Feb16-Feb17-Feb18-Feb19-Feb20-Feb21-Feb22-Feb23-Feb24-Feb25-Feb26-Feb27-Feb28-Feb29-Feb
4Jeff1015021.19.922.508.42214.20.317.513.907.484.64.80000000000000000
5Justin101549220406.510.45.25.2313.8000000000000000000000
6Ramy10364211.26.23.50015.159.411.69.501.415.8119.60000000000000000
Mar


for the purposes of the example i have just copied the data from my "aggregated Data" sheet and made copies if it to mock up months of jan, feb, and mar. any help would be appreciated.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
TECH HOURS WORKSHEET 2.0 tester.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
111-Feb17-Feb
2
3Week to DateJan
4Feb
5Mar
610150210154910364210713210747110780110822810824310841010863410954310957210978310993010210241021025102102610210271021028102102910210321021037102103810210391021040Apr
7JeffJustinRamyTuzzoBrandunCarlRod JonesQue JamesOwensHawkJoshDavidAngelImmanuelJamiePeterFrederickJerushaGerrardo TreHarryContrerTrevinVenroMay
8hours24.80#REF!Jun
9Jul
10Aug
11Sep
12Oct
13year to DateNov
14Dec
Hours
Cell Formulas
RangeFormula
A1A1=WORKDAY.INTL(B1+1,-1,"1111110")
C8C8=SUMIFS('Aggregated Data'!C4:AG4,'Aggregated Data'!C3:AG3,">="&A1,'Aggregated Data'!C3:AG3,"<="&B1)
D8D8=SUMIFS('Aggregated Data'!C5:AG5,'Aggregated Data'!C3:AG3,">="&A1,'Aggregated Data'!C3:AG3,"<="&B1)
E8E8=SUMPRODUCT(SUMIFS(INDIRECT("'"&$AK$3:$AK$14&"'!C4:AG4"),(INDIRECT("'"&$AK$3:$AK$14&"'!C3:AG3,">="&A1")),(INDIRECT("'"&$AK$3:$AK$14&"'!C3:AG3,"<="&B1"))))


i did try this formula im not sure if i have an error in it or if it cant be used like this =SUMPRODUCT(SUMIFS(INDIRECT("'"&$AK$3:$AK$14&"'!C4:AG4"),(INDIRECT("'"&$AK$3:$AK$14&"'!C3:AG3,">="&A1")),(INDIRECT("'"&$AK$3:$AK$14&"'!C3:AG3,"<="&B1"))))
 
Upvote 0
What are you trying to do? Your three monthly mock-up worksheets are identical, except for the sheet names. Jan, Feb, and Mar all use the same dates in February, same names, same hours. And none of those sheets are referenced in your Aggregated Date worksheet. There, formulas refer to an RTH worksheet that is not described. It would be helpful to explain what you expect to be do every month. Are you trying to aggregate hours from certain months?...which ones?...how would those months be specified?
 
Upvote 0
What are you trying to do? Your three monthly mock-up worksheets are identical, except for the sheet names. Jan, Feb, and Mar all use the same dates in February, same names, same hours. And none of those sheets are referenced in your Aggregated Date worksheet. There, formulas refer to an RTH worksheet that is not described. It would be helpful to explain what you expect to be do every month. Are you trying to aggregate hours from certain months?...which ones?...how would those months be specified?
I just copied the month of Feb since it was the only data collected to this point. As the months end the sheet will be copied to the corisonding month for reference purposes. The rth sheet that is referenced is the raw data report that is input into my spreadsheet every day and updates the cells in the aggregated data sheet accordingly. The months and days would be indicated by row 3 on each sheet in a normal.date format. Ultimately my sumifs function needs to be able to sum the numbers from each name in the list starting with the Date in a1 and ending in the date b1 across the aggregated data, jan, feb, mar, apr, may, Jun, Jul, Aug, sep, Oct, Nov, and Dec sheets
 
Upvote 0
Ultimately my sumifs function needs to be able to sum the numbers from each name in the list starting with the Date in a1 and ending in the date b1 across the aggregated data, jan, feb, mar, apr, may, Jun, Jul, Aug, sep, Oct, Nov, and Dec sheets
I'm still puzzled. I'm assuming the reference to A1 and B1 means the the cells on worksheet Hours shown in post #1? But those cells are set up to receive an input from the user in B1, and then the formula in A1 finds the date of the prior Sunday. So this represents, at most, a date range of only one week. Is the formula in A1 only temporary, and at times you might input a different date, or modify the formula to go back further in time?
I just copied the month of Feb since it was the only data collected to this point.
My point about Jan, Feb, and Mar is that--to the reader--we do not know what you know about your data or your worksheets. I would have expected a Jan worksheet to show calendar dates in the month of January, along with fictitious data...data that would be different from February's. That way, when testing formulas, it is easy to confirm that data are being pulled from the correct worksheets. As it stands now, you can't pull data from the Jan or Mar worksheets without specifying dates in February, unless you rely solely on looking up cell addresses, rather than relying on the dates in rows 2 or 3 of the monthly sheets.
As the months end the sheet will be copied to the corisonding month for reference purposes.
I'm confused...where are data initially recorded? I assumed that during January, daily data were recorded on the Jan worksheet, and when January ends, the Jan worksheet is archived and you move to a new worksheet named "Feb". But now the mystery of the RTH worksheet is becoming clearer. Are you saying that you always use the RTH worksheet for daily recording, regardless of the month...and you collect one month of data on the RTH worksheet, copy all of that data to an archived worksheet named for the month (Jan, Feb, Mar, etc.), then clear the data block on the RTH worksheet and prepare it for the next month?

Do you ever need to sum over a date range that crosses from one calendar year to another, say December 2023 through February 2024?

Based on what I am understanding at the moment, I would seriously consider changing the archiving process, and perhaps use Power Query to transform each month's input table on the RTH worksheet (assuming that is correct) into a flat table represented by just 4 columns: Name, col B code (whatever that represents), Date, Hours...and that transformed monthly table would be appended to an accumulating table that has all prior months' data in it, creating a single historical archive. That table would grow in length, approximately 30 * number of staff each month. The table, while not very easy for us to look at and understand, is very well suited for use by Excel formulas. It can be readily filtered to extract data by person, date/date range,..and the question you are asking about summing over certain months could be done without having to either hardcode multiple worksheet names into formulas or rely on INDIRECT functions. But let me ask first, about how large are these monthly tables...how many people (rows) are being logged each month?
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,166
Members
452,615
Latest member
bogeys2birdies

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