Countif Multiple Criteria

Rob #4

Board Regular
Joined
Jun 19, 2003
Messages
194
I am trying to figure out a formula that will count the number of people that meet multiple criteria. There are 3 criteria that I am trying to meet, First Column A has the persons Work Class, Column B has the persons Company Name, and then Columns K thru N has the persons hours worked for the Month. The Formula I am trying to create is the count the number of people with the same work class, same company and if they have worked more then 1 hour. Does anyone have any suggestions? Thank you in advance.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
use the countifs function if you have Excel 07+

=Countifs(range1,criteria1,range2,criteria2....)
 
Upvote 0
sumproduct with no addition array will do it in 2003, not sure about prior versions.

=sumproduct(--(range1=criteria1),--(range2=criteria2))
 
Upvote 0
I have Excel Version 2003, so Countifs does not work. Sumproduct, will this count the number people or do I need it to add another column?
 
Upvote 0
I have determined SumProduct will work. I have the formula reconizing the first 2 criteria, now the last part of it I am trying to figure out is how to include the hours worked. I have the hours for the month on 4 columns, by week, Columns K, L, M, N. I want to finish the formula by saying that if the number in any of these columns is >1, I want to count them. That might be confusing, but if anyone has any ideas, please let me know. Thanks
 
Upvote 0
I'm not sure I follow, you might want to post a sample of your data and what you're looking for.
 
Upvote 0
I am trying to figure out a formula that will count the number of people that meet multiple criteria. There are 3 criteria that I am trying to meet, First Column A has the persons Work Class, Column B has the persons Company Name, and then Columns K thru N has the persons hours worked for the Month. The Formula I am trying to create is the count the number of people with the same work class, same company and if they have worked more then 1 hour. Does anyone have any suggestions? Thank you in advance.
Control+shift+enter, not just enter:

=(SUM(IF($A$2:$A$100=Class,IF($B$2:$B$100=Company,$K2:$N$100)))>1)+0

Does this satisfy? Note that you need to specify Class and Company.
 
Upvote 0
This got me past 2 criteria:

=SUMPRODUCT(--('Resident Worker Hour Report'!$B$19:$B$400="Company"),--('Resident Worker Hour Report'!$A$19:$A$400="Class"))

But now in Columns K thru ??????, I have each week of the year, listing workers hours for each week. Now that I have the number of people from each company and class, I need to know the number of people who worked hours in January, February, etc. So January is Columns K thru N, February is columns O thru R. I need to continue this formula if someones hours are more the 1 I want to count them.

The formula I have above returns the number of people working for a company and each class as 7. Of that 7 maybe only 2 worked hours in January and maybe only 4 worked in February.

Hopefully this shows a little more of what I am trying to do. Thanks
 
Upvote 0

Forum statistics

Threads
1,224,565
Messages
6,179,549
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top