• Status: Solved
• Priority: Medium
• Security: Public
• Views: 256

# How do I use SUMIF to sum time cells based on two criteria?

Hello Experts,
I am trying to make a SUMIF formula work that is based on two criteria.  I've attached a sample worksheet.  Can you help?

Gary

SUMIF-Help-EE-2.xls
0
garyrobbins
• 6
• 4
1 Solution

Commented:
Gary you can use sumproduct to get your results for example

=SUMPRODUCT((A4:A25="Out, First")*(B4:B25))

Will sum durations where "activity" matches "Out, First"

Sid

0

Commented:
is the duration in hours?

if so this should work:

=(SUMPRODUCT((A4:A25="Out, First")*(C4:C25>0)*(B4:B25)))*24
0

Commented:
And for your condition 2 you can use

=SUMPRODUCT((A4:A25="Out, First")*(C4:C25>0)*(C4:C25))

Sid
0

Commented:

Sid
0

Commented:
no problem, our response's aren't exactly the same, similar though, so whatever he chooses to go with that works best for him........

Brandon
0

Commented:
wouldn't yours be summing column c though?  i believe he wants column B summed............i think....
0

Commented:
the other thing, without the *24 it brings back a response of .333333..., easily solved by reformatting the cell as well, or just multiplying by 24.........either way
0

Commented:
>>>no problem, our response's aren't exactly the same,

Yeah :)

I just gave Garry two conditions like he wanted.

Sid
0

Commented:
>>the other thing, without the *24 it brings back a response of .333333..., easily solved by reformatting the cell as well, or just multiplying by 24.........either way

Yeah. I reformatted the cell :)

Sid
0

Author Commented:
When Experts compete, I win!  I not only get fast results, but also helpful variations.

Great responses guys -- thank you.

Gary
0

Commented:
I feel as if I have wasted my time on this thread...

Sid
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.