How to count items?

E

exceldummy

Hi! I don't know how to word this, but let me try....

My sample data:
High, 00:00:04
High, 00:10:25
High, 00:13:45
Medium, 03:41:44
Medium, 21:11:45
Low, 2:00:01
Low, 4:00:04

I want to count the number of High's that's less than 1 hour, less than
8 hours, and more than 8 hours. And then the same for Medium as well
as Low.

Maybe I've phrased it wrongly but I can't find anything around.
Help!!!! I'm so stupid!:(
 
P

Paul

exceldummy said:
Hi! I don't know how to word this, but let me try....

My sample data:
High, 00:00:04
High, 00:10:25
High, 00:13:45
Medium, 03:41:44
Medium, 21:11:45
Low, 2:00:01
Low, 4:00:04

I want to count the number of High's that's less than 1 hour, less than
8 hours, and more than 8 hours. And then the same for Medium as well
as Low.

Maybe I've phrased it wrongly but I can't find anything around.
Help!!!! I'm so stupid!:(

Try formulas such as this:
=SUMPRODUCT((A1:A7="High")*(B1:B7<TIME(1,0,0)))

Perhaps better would be to have the comparison values in cells, such as
"High" in C1 and 1:00:00 in D1, and use:
=SUMPRODUCT((A1:A7=C1)*(B1:B7<D1))
 
H

Harlan Grove

exceldummy said:
It doesn't work. Do you need any add-in for this to work?

In what way doesn't it work? Does Excel not accept the formula at all? Does
Excel return error values? Does Excel simply return the wrong value?

Details are always useful if not essential.

The formulas in Paul's response should work unless there are details you've
neglected to mention. No add-ins needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top