Once Cell has text and another numbers

phillexcel

New Member
Joined
Aug 5, 2014
Messages
31
In cell B2:B328 I have a list of names

In cell C2:C328 I have either the number 1 or 0

In cell B348 I have......

=countif(B2:B328,"alex")

This counts the amount of times the name Alex appears ,however I only want it to calculate the total amount of times he appears if the number 1 appears next to his name from the cell range c2:c328

Please can anyone help me?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=SUMPRODUCT(--(B2:B328="alex"),--(C2:C328=1))
 

phillexcel

New Member
Joined
Aug 5, 2014
Messages
31
This doesn't appear to work, it's just generating zero, it isn't adding the amount of 1s against Alex's name and giving me the total.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,507
Messages
5,837,758
Members
430,515
Latest member
K_Lynch

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