SUMIFS help

Copper Contributor

Hello,

 

I have the following tables:

 

Table 1 : 

 

Project I/DNameProject CriticalityStart period 1 (yyyyww)End period 1 (yyyyww)Hours work/week period 1Start period 2 (yyyyww)End period 2 (yyyyww)Hours work/week period 2
1John Smith120210120214352021442022037
2Karen Smith220210120220242022032023045
3John Smith220211020211322021142021193
4Karen Smith120211020220212022032022452

 

Table 2: 

 

Period
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2201
2202
2203
2204
2205
2206
22..

 

On table 2 , I want to add new columns to calculate the SUM of working hours per period and per project criticality. I believe SUMIFS would be the formula to generate these new values., but I have some trouble to do it...  Can you please help on the formula to use to generate these new columns?

 

PeriodSUM Hrs / Week C1 John SmithSUM Hrs / Week C2 John SmithHrs / Week C1 Karen SmithHrs / Week C2 Karen Smith
2101    
2102    
2103    
2104    

 

OR is there any other suggestiont to do this better?

 

The file is enclosed as well.

 

Kind Regards, 

3 Replies

@Antoine102 

In B5 on New Table:

 

=SUMIFS('Table 1'!$F$2:$F$5000,'Table 1'!$B$2:$B$5000,B$1,'Table 1'!$C$2:$C$5000,B$2,'Table 1'!$D$2:$D$5000,"<="&200000+$A5,'Table 1'!$E$2:$E$5000,">="&200000+$A5)+SUMIFS('Table 1'!$I$2:$I$5000,'Table 1'!$B$2:$B$5000,B$1,'Table 1'!$C$2:$C$5000,B$2,'Table 1'!$G$2:$G$5000,"<="&200000+$A5,'Table 1'!$H$2:$H$5000,">="&200000+$A5)

 

Fill to the right to E5, then fill down.


Hi Ijust realized there is a error on my file. The table 1 should be as follow:

[Project I/D ] [Name ] [ Project Criticality ] [Period 1 End date] [Hours period 1] [Period 2 End date] [Hours period 2 ] [Period 3 End date] [Hours period 3] [Period 4 End date] [Hours period 4]

Could I still use SUMPRODUCT? What formula would you recommend?

TKs,

@Antoine102 

So there is no start date anymore? See the attached version. I changed the layout of Table3 slightly.