Reputation: 445
I have a table, like so:
TYPE DEPARTMENT HOURS
DEV DESIGN 3
PROTO 7
TRIM 2
APPL DESIGN 1
TRIM 3
R&D DESIGN 10
What I want to do, is create a table for each department which works out the total amount of hours they spent on each 'TYPE'. For Instance:
DESIGN DEPARTMENT
TYPE HOURS
DEV 3
APPL 1
R&D 10
I was thinking of doing a VLOOKUP and combine it with a SUMIF but if I am not mistaken, VLOOKUP won't look through everything will it? It stops when it finds the first one.
I am open to trying this in VBA but it would be easier to use a formula. Do you guys have any suggestions? I don't need walking through it, just pointing in the right direction.
Thanks.
Upvotes: 0
Views: 715
Reputation: 59460
Fill the gaps in your Type column see then use a PivotTable with DEPARTMENT
for Report Filter, TYPE
for Row Labels and Sum of HOURS for Σ Values.
Upvotes: 0
Reputation: 149295
A simple SUMPRODUCT
formula will solve what you want.
=SUMPRODUCT((A2:A7=F3)*(B2:B7=F1)*(C2:C7))
See this screenshot. Please amend the above formula for your scenario.
Upvotes: 1