COUNTIF with 2 seperate events

DeCaelo

New Member
Joined
Mar 17, 2011
Messages
29
I have 2 columns with numbers in A and names in B.

1 DAVE
2 STEVE
3 MIKE
1 DAVE
2 FRED
4 Steve

What's the best way to go about finding how many times Dave appears with a 1?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
How about a pivot table?

If not

2007 =COUNTIFS($A$1:$A$6,1,$B$1:$B$6,"Dave")

Pre-2007 =SUMPRODUCT(--($A$1:$A$6=1),--($B$1:$B$6="Dave"))

Instead of hard coding you could also point to a cell.

=COUNTIFS($A$1:$A$6,G1,$B$1:$B$6,H1)
=SUMPRODUCT(--($A$1:$A$6=G1),--($B$1:$B$6=H1))
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

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