countif?

llmikegood

New Member
Joined
Aug 19, 2006
Messages
30
How do I count the occurences of a value in one column based on the value in the same row of another column. Example: how many employees that are Part time are available on weekends??

employment status available weekend (yes,no,maybe)
joe pt y
dave pt y
mary pt n
tim pt m
dfa ft y
afaf ft m
dyhyh ft n
ffffsss ft y
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

How's this:

=SUMPRODUCT(--(B1:B10="pt"),--(C1:C10="y"))

You could also use range references for "pt" & "y".

Hope that helps,

Smitty
 

Packman

New Member
Joined
Oct 6, 2006
Messages
4
In the formula solution for this (which works very well and I was able to use it to solve a completely different issue), what does the "--" do in the formula? What does that designate?
 

Forum statistics

Threads
1,137,201
Messages
5,680,136
Members
419,885
Latest member
Murugesha

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
Top