countif??

lr822

New Member
Joined
Nov 19, 2010
Messages
3
I am trying to do a formula to count the number of rows that have a certain value in two different columns.

For example, if the person in row 1 has a value of 3 in column b and 1 in column c, I want them counted.

I have done =COUNTIF(B:B,3)+COUNTIF(C:C,1), but that counts all of the people that have 3's in column b and adds them to those that have 1's in column c. I only want them counted only if both conditions are met.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
If you use Excel 2003 or earlier:

=SUMPRODUCT(--(B1:B100=3),--(C1:C100=1))

If you use Excel 2007 or later:

=COUNTIFS(B1:B100,3,C1:C100,1)
 
Upvote 0
Thanks. But neither of those worked. The countifs came back with "name?" error and the sumproduct came back with 0, when there are values there. I'm sure it's something simple I'm doing wrong, but can't figure it out.
 
Upvote 0

Forum statistics

Threads
1,215,659
Messages
6,126,071
Members
449,286
Latest member
Lantern

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