# Countif formula

#### halcyoneus

##### Board Regular
Not sure if Countif is the corent formula to be using....

I have 2 columns in a spreadsheet. Column A will have a multiple names in them, we'll use Bob and Joe for example. Column B will have a number 0-3 in it. I was trying to use the Countif formula to figure out how many entries there are for Bob with a 0 in column B, Bob with a 1 in column B, Joe with a 0 in column B......and so on.

Something like this.....

COLUMN A.....COLUMN B
Bob....................1
Bob....................0
Joe.....................3
Joe.....................2
Bob....................1

NAME..0's...1's...2's...3's
Bob.....1......2.....0.....0
Joe......0......0.....1.....1

~Hal

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

#### DominicB

##### Well-known Member
Good evening halcyoneus

Try using the SumProduct function :

=SUMPRODUCT(--(Sheet1!\$A\$1:\$A\$100="Bob"),--(Sheet1!\$B\$1:\$B\$100= 0 ))

HTH

DominicB

#### Brian from Maui

##### MrExcel MVP
You could also use a Pivot Table.

#### halcyoneus

##### Board Regular
Good evening halcyoneus

Try using the SumProduct function :

=SUMPRODUCT(--(Sheet1!\$A\$1:\$A\$100="Bob"),--(Sheet1!\$B\$1:\$B\$100= 0 ))

HTH

DominicB

Awesome ! ! !

Works exactly they way I wanted it to.

~Hal

Replies
17
Views
410
Replies
1
Views
331
Replies
21
Views
571
Replies
3
Views
362
Replies
5
Views
281

1,171,982
Messages
5,878,599
Members
433,354
Latest member
miihj

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