SUMIFS - Multiple columns at the same time?

StephenM123

New Member
Joined
Apr 19, 2019
Messages
8
Afternoon all,

Looking for some help/advice please... I hope this makes sense.

I have a holiday file which is set out in a similar manner as below and tracks the full year.
The actual file has around 400 employees in it but for the sake of this I've just classes a few as different job types.
The columns do not change and stay the same but I want my output to have an 8 week future view of hours booked.

I'm looking for a way to sum all holidays hours from the week per process in to seperate buckets. (I want to use a formula if possible and not a pivot)
I know I could do multiple sumifs for each column and add them together in the one but surely there is an easier way?


Week Num
40404040404141414141414142424242424242
Job
Date01-Oct02-Oct03-Oct04-Oct05-Oct06-Oct07-Oct08-Oct09-Oct10-Oct11-Oct12-Oct13-Oct14-Oct15-Oct16-Oct17-Oct18-Oct19-Oct
DeskDay101010
DeskDay10
DeskDay10101010101010
DeskDay
DeskBack
DeskBack
LogisticsDay10101010101010101010
LogisticsDay
LogisticsDay
LogisticsDay101010101055
LogisticsBack1010
LogisticsBack1010
OperationDay
OperationDay10
OperationDay10
OperationDay10
OperationBack10
OperationBack10
VirtualDay10
VirtualBack
VirtualBack

<tbody>
</tbody>


Example Output - This would give an 8 week view changing as the weeks tick by:


Job/Week
40
41
42
Desk
501050
Logistics907040
Operation
50
Virtual
10

<tbody>
</tbody>











Any help would be brilliant or if you need more information I'll try give you as much as possible.

Thank you!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Use SUMPRODUCT instead:

=SUMPRODUCT((first column = "Desk")*(firstrow = 40)*datarange)

adjusting the ranges to fit your data.
 
Upvote 0
How about


Book1
ABCDEFGHIJKLMNOPQRSTU
1Week Num40404040404141414141414142424242424242
2JobDate01-Oct02-Oct03-Oct04-Oct05-Oct06-Oct07-Oct08-Oct09-Oct10-Oct11-Oct12-Oct13-Oct14-Oct15-Oct16-Oct17-Oct18-Oct19-Oct
3DeskDay101010
4DeskDay10
5DeskDay10101010101010
6DeskDay
7DeskBack
8DeskBack
9LogisticsDay10101010101010101010
10LogisticsDay
11LogisticsDay
12LogisticsDay101010101055
13LogisticsBack1010
14LogisticsBack1010
15OperationDay
16OperationDay10
17OperationDay10
18OperationDay10
19OperationBack10
20OperationBack10
21VirtualDay10
22VirtualBack
23VirtualBack
24
25
26
27Job/Week404142
28Desk501050
29Logistics907040
30Operation0500
31Virtual0100
Lookup
Cell Formulas
RangeFormula
B28=SUMPRODUCT(($A$3:$A$23=$A28)*($C$1:$U$1=B$27),$C$3:$U$23)
 
Upvote 0
Thank you!

Totally works. I'll use this method just now.

It seems to be a super intense way of doing this due to the number of people/full years worth of data.

Either of you don't know of a way that might not make my sheet slow down so much?
 
Upvote 0
Is there a specific reason to not use a pivot table? There is a big reason why VBA and power pivot and power query has been developed, handling big data with normal Excel formulas are computation heavy.
 
Upvote 0
My previous experience is that Pivots increase file size by a huge amount.

Maybe I've missed a trick and need to weigh up file size vs the workload.
 
Upvote 0
With the data sorted - column A & row 1 - like the example, maybe this would be OK?
Use MATCH functions to identify the first row/column, and COUNTIF for how many rows/columns. Then SUM(OFFSET(range you want))
Details below


Enter in cells
C36 "Desk"
C37 "Logistics"
C38 "Operation"
C39 "Virtual"


In row 33 enter
D33 40
E33 41
F33 42


In row 34
C34 "offset to first"
D34 =MATCH(D33,1:1,0)-1
drag D34 across to fill D34:F34 [See results 2,7,14]


In row 35
A35 "offset to first"
B35 "count"
C35 "count"
D35 =COUNTIF(1:1,D33)
drag D35 across to fill D35:F35 [See results 5,7,7]


Down column A
A36 =MATCH(C36,$A$1:$A$23,0)-1
drag A36 down to fill A36:A39 [See results 2,8,14,20]
B36 =COUNTIF($A$1:$A$23,C36)
drag B36 down to fill B36:B39 [See results 6,6,6,3]


in cell
D36 =SUM(OFFSET($A$1,$A36,D$34,$B36,D$35))
drag to fill D36:F39
 
Upvote 0
For me File size is less an issue then a file that Always need to have calculations set to manual, since most user dont get that they then need to force a calculation to get updated values. With a pivot or vba I can just make a refresh button.

With power pivot you can even export your raw data into a separate text file and only have pivots in the workbook further reducing the size.
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,255
Members
448,879
Latest member
oksanana

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