multiple sumif formula

X

XCESIV

Here is a basic description of wat i am wanting to do
i have a spreadsheet of about 10 columns.

i need to get data from this sheet and cant do the math on it.

This can be simplified to this
I have A-location, B-department, C-cost
1 - front - cleaning - $100
2 - middle - service - $50
3 - front - admin - $200
4 - middle - manager - $110
5 - front - manager - $110
6 - back - assistant - $7
7 - middle - admin - $5
8 - front - cleaning - $50
9 - front - manager - $110
10 - middle - cleaning - $10

i want to add up all the sections seperatly.
how much money was costed to the cleaning in each location
EG - front cleaning $150
front manager $220
middle cleaning $10
back assistant $10

the positions and location will be changing every time this sheet i
use
 
A

Aladin Akyurek

Two options..

1]

D1, copied down:

=A1&"#"&B1

Then invoke in I1 and copy down:

=SUMIF($D$1:$D$10,G1&"#"&H1,$C$1:$C$10)

where G1 houses a condition like 'front' and H1 a condition like 'manager'.

2] Without the additional range in D...

I1, copied down:

=SUMPRODUCT(--($A$1:$A$10=G1),--($B$1:$B$10=H1),$C$1:$C$10)
 
Top