COUNTIF is 0 - Two values in the same column

alaa_mjd

New Member
Joined
Aug 2, 2023
Messages
5
Office Version
  1. 2013
Platform
  1. Windows
Hello,
It seems that my formula is not counting 2 different values in the same column. The only calculation that worked was one with identical values.
Can you share a method to associate multiple values to the same "label"? My plan is to use SUMIF using the label values later on..

=COUNTIFS($A$2:$A$12,A15,$A$2:$A$12,B15,$B$2:$B$12,"Yes")
A15= {Label}
B15= {Department}

1690990051331.png

Thanks in advance!
Al
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
What exactly are the values in A15 & B15?
 
Upvote 0
Your formula in row 15 is trying to count how many times "Business Operations", "Business Ops" and "Yes" are found in the same row in rows 2:12.
There are no rows where that is true and hence the count is 0.
  1. Please explain in words exactly what you are trying to do.
  2. What result do you want/expect in row 15 and why?
 
Upvote 0
The sheet has several jobs under the each department. I want to demonstrate the highest outsourcing arrangements in each department.
My plan is to count the "Yes" in C15 column then SUMIF the results based on their "Labels".
 
Upvote 0
I did :) "My plan is to count the "Yes" in C15 column then SUMIF the results based on their "Labels"."
 
Upvote 0
My plan is to count the "Yes" in C15 column
That is easy then (though I don't believe for a moment that it is what you want)
Excel Formula:
=COUNTIF(B2:B12,"Yes")


then SUMIF the results based on their "Labels"."
There are no numbers anywhere in the sample data so any SUMIF based on that sample data will return 0.
Again though, I don't believe that is what you actually want, but you are not clarifying what you do want.


You did not answer the question about what actual answer you expect in row 15.
 
Upvote 0
With A15 = "Business Operationd" and B15 = "Business Ops"
your formula:
=COUNTIFS($A$2:$A$12,A15,$A$2:$A$12,B15,$B$2:$B$12,"Yes")
attemp to look for row where:
cell in B contains "Yes"
cell in A contains A15 AND B15 at the same time (imposible)

So, if you want to count rows where ("Yes" in col B) and (A15 OR B15) in col A
It should be 2 COUNTIFs:
Code:
=COUNTIFS($A$2:$A$12,A15,$B$2:$B$12,"Yes")+COUNTIFS($A$2:$A$12,B15,$B$2:$B$12,"Yes")
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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