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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,051
Messages
5,639,773
Members
417,112
Latest member
PachRedoc

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