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

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
Asked:
garyrobbins
  • 6
  • 4
1 Solution
 
SiddharthRoutCommented:
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
 
KnutsonBMCommented:
is the duration in hours?

if so this should work:

=(SUMPRODUCT((A4:A25="Out, First")*(C4:C25>0)*(B4:B25)))*24
0
 
SiddharthRoutCommented:
And for your condition 2 you can use

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

Sid
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
SiddharthRoutCommented:
Oh, I didn't see your reply KnutsonBM:

Sid
0
 
KnutsonBMCommented:
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
 
KnutsonBMCommented:
wouldn't yours be summing column c though?  i believe he wants column B summed............i think....
0
 
KnutsonBMCommented:
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
 
SiddharthRoutCommented:
>>>no problem, our response's aren't exactly the same,

Yeah :)

I just gave Garry two conditions like he wanted.

Sid
0
 
SiddharthRoutCommented:
>>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
 
garyrobbinsAuthor Commented:
When Experts compete, I win!  I not only get fast results, but also helpful variations.

Great responses guys -- thank you.

Gary
0
 
SiddharthRoutCommented:
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.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now