counting problem

HSOLDO

Board Regular
Joined
Sep 3, 2007
Messages
125
hello,

i have column A that has names and column B that has yes or no.
I need to count how many times same name in column a received Yes and how many times it received no.

for example:
A1=alex B1=yes
A2=alex B2=no
A3=marcus B3=no
A4=alex B4=yes

G4= how many times alex received yes?
G5= how many times alex received no?

thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
G4: = sumproduct(--(A1:A4="Alex"),--(B1:B4="Yes"))
G5: = sumproduct(--(A1:A4="Alex"),--(B1:B4="No"))

You may need to extend the ranges to fit your full dataset

You can use pivot tables for this type of task, so long as the data has column headers. Especially useful if there are lots of names and/or combinations of result.
 
Upvote 0
hello,

i have column A that has names and column B that has yes or no.
I need to count how many times same name in column a received Yes and how many times it received no.

for example:
A1=alex B1=yes
A2=alex B2=no
A3=marcus B3=no
A4=alex B4=yes

G4= how many times alex received yes?
G5= how many times alex received no?

thanks

G4:

=SUMPRODUCT(--($A$1:$A$4="Alex"),--($B$1:$B$4="Yes"))

In G5 the same formula with No substituted for Yes...
 
Upvote 0

Forum statistics

Threads
1,224,543
Messages
6,179,429
Members
452,914
Latest member
echoix

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