# Once Cell has text and another numbers

#### phillexcel

##### New Member
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

### Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try

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

Try

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

Try

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

This doesn't appear to work , it just generates 0

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.

Apologies - it is working! Thanks!

Replies
16
Views
594
Replies
4
Views
298
Replies
6
Views
396
Replies
3
Views
200
Replies
3
Views
148

1,220,011
Messages
6,151,453
Members
451,028
Latest member
greekness1

### 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.

### Which adblocker are you using?

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

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