# Sum Multiple Lines based on Multiple Criteria

1. ## Sum Multiple Lines based on Multiple Criteria

Hi,

I'm sure the solution to this is pretty simple, but I can't work out whether the issue is because the sum is time or the formula's I am trying. I want the table to the right to sum the times that fit the criteria on both axis, so for example all the times for "Andrew W" in the state "Alerting" to sum and show in the table to the right (sorry but it won't let me attach a file for some reason).

Thanks

Capture.JPG

2. ## Re: Sum Multiple Lines based on Multiple Criteria

I'm guessing since there is no sample but maybe =SUMPRODUCT((\$A:\$A=\$E2)*(\$B:\$B=F\$1)*(\$C:\$C)) dragged down and right.

AND, by the way, I'd adjust the ranges instead of using whole columns.

3. ## Re: Sum Multiple Lines based on Multiple Criteria

F2 copy to H3
=SUMIFS(\$C1:\$C99,\$A1:\$A99,\$E2,\$B\$1:\$B\$99,F\$1)

Select F2:H3 and set Custom Format to [hh]:mm:ss

4. ## Re: Sum Multiple Lines based on Multiple Criteria

Originally Posted by Sambo kid
I'm guessing since there is no sample but maybe =SUMPRODUCT((A:A=\$E2)*(B:B=F\$1)*(C:C)) dragged down and right.
Thanks for this, I thought it should be something like that too, but I just get #VALUE! error's.

5. ## Re: Sum Multiple Lines based on Multiple Criteria

Originally Posted by Bo_Ry

F2 copy to H3
=SUMIFS(\$C1:\$C99,\$A1:\$A99,\$E2,\$B\$1:\$B\$99,F\$1)

Select F2:H3 and set Custom Format to [hh]:mm:ss
That worked! Many Thanks

6. ## Re: Sum Multiple Lines based on Multiple Criteria

I forgot to add absolutes to mine so it likely would error out after the first column (see it now). But without a sample to test against I was only guessing. A sumifs is probably as good as option as any and so glad you got your answer from Bo_Ry.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1