Countif with two conditions and cells one a number and other text

F

Frank Alonso

I have a need to write a formula that counts how many hours someone has spent
working on a particular type of equipment. I have the information in two
cells, one containing the total hours, and one contains the type of
equipment. there are hundreds of employees working on 4 types of equipment
over a 14 day period. I need to be able to quantify how many hours each
employee has worked on each type of equipment. Is there a formula that can
look at the two cells and quantify the hours based on the second cell
(equipment)?
 
S

Sheeloo

=SUMPRODUCT(--(A1:A100="Type1"),(B1:B100))
with types in Col A and hours in Col B.

Instead of "Type1" you can use a reference containing the type you want
like this
=SUMPRODUCT(--(A1:A100=C1),(B1:B100))
 
S

smartin

Frank said:
I have a need to write a formula that counts how many hours someone has spent
working on a particular type of equipment. I have the information in two
cells, one containing the total hours, and one contains the type of
equipment. there are hundreds of employees working on 4 types of equipment
over a 14 day period. I need to be able to quantify how many hours each
employee has worked on each type of equipment. Is there a formula that can
look at the two cells and quantify the hours based on the second cell
(equipment)?

Try SUMPRODUCT for subtotals over two or more conditions:
http://xldynamic.com/source/xld.SUMPRODUCT.html

Or try a pivot table for an instant big picture.
 

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