Need some Count If help....

SRGsMom

New Member
Joined
Jul 20, 2007
Messages
17
I have looked and looked for a resolution, this has to be simple and I hope I'm overthinking it.

I have used sumif, countif, sumproduct, etc....nothing works.


Column C has training names in it, values could be Overview, Claims, Enrollments, etc.

Column D has a Yes or No in it (meaning did the attendee show up or not)

I want to Count the Yes responses in column D, IF the training name is Overview in column C.


So...
Overview Attended -- Want a # Here (should be 3)

Column C Column D
Trg Name Attendeed
Overview Yes
Overview Yes
Claims Yes
Enrollments Yes
Overview No
Overview Yes
Claims Yes

(I previewed the post and I see my "example" didn't work out so well, hope that isn't too confusing)

Your help would be GREATLY appreciated! I do know that on some array formulas you have to do the Control+Shift+Enter, and I'm still not getting it right.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I have looked and looked for a resolution, this has to be simple and I hope I'm overthinking it.

I have used sumif, countif, sumproduct, etc....nothing works.


Column C has training names in it, values could be Overview, Claims, Enrollments, etc.

Column D has a Yes or No in it (meaning did the attendee show up or not)

I want to Count the Yes responses in column D, IF the training name is Overview in column C.


So...
Overview Attended -- Want a # Here (should be 3)

Column C Column D
Trg Name Attendeed
Overview Yes
Overview Yes
Claims Yes
Enrollments Yes
Overview No
Overview Yes
Claims Yes

(I previewed the post and I see my "example" didn't work out so well, hope that isn't too confusing)

Your help would be GREATLY appreciated! I do know that on some array formulas you have to do the Control+Shift+Enter, and I'm still not getting it right.
Try one of these...

Using cells to hold the criteria:
  • F2 = Overview
  • G2 = Yes
This formula will work in ALL versions of Excel:

=SUMPRODUCT(--(C2:C8=F2),--(D2:D8=G2))

This formula will work in Excel versions 2007 and later:

=COUNTIFS(C2:C8,F2,D2:D8,G2)
 
Upvote 0
Nope -- I did this: =sumproduct(--(c1:c5000="Overview"),--(D1:D5000="Yes"))

and I get the "The formula you typed contains an error." message box
 
Upvote 0
Nope -- I did this: =sumproduct(--(c1:c5000="Overview"),--(D1:D5000="Yes"))

and I get the "The formula you typed contains an error." message box
That formula is syntactically correct so I don't know what Excel might be complaining about.

Does it highlight a section of the formula?
 
Upvote 0
I redid the formula with the suggestion above putting Overview and Yes in seperate cells, both times, when it complains, it highlights the comma between the C argument and D argument.

So I took the comma out, tried again and it gives me the #Value! error.

New Formula: =SUMPRODUCT(--C1:C5000=G3)--(D1:D5000=H2)
Also Tried: =SUMPRODUCT(--C1:C5000="Overview")--(D1:D5000="Yes")
 
Last edited:
Upvote 0
Nope -- I did this: =sumproduct(--(c1:c5000="Overview"),--(D1:D5000="Yes"))

and I get the "The formula you typed contains an error." message box

I had read on this forum, your language settings cause an error (it was referring to "dutch" language I suppose) and the suggestion was to use ";" instead of "," (different character). Otherwise the above formula works fine.
 
Upvote 0
Yes, if you use , as the decimal separator you need to replace , with ;

Excel Workbook
CDE
1OverviewYes2
2ggYes
3overviewyes
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,390
Members
452,909
Latest member
VickiS

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