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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,891
Members
449,058
Latest member
Guy Boot

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