Counting columns based on conditions

mike4777

Board Regular
Joined
Apr 12, 2011
Messages
124
Hi there. Just want to say, I am familiar with countif(s) formula. I just can't seem to see the solution clearly enough for my scenario.

I have a tab "Sign in Sheet". It is for a medical class. People sign in on column B11 and down. In columns J and K we put a "y" to indicate they showed up for day 1 or day 2. Some individuals may show up both days, some the first day only and some the second day only. I want to count everyone that showed up once. I can count row one and row two with
Code:
sum(countif(J11:J50, "y"), countif(K11:k50, "y")

But this will count those who showed up both days twice. I'd also like to count how many only showed up on day 1 and how many only showed up on day 2.

So perhaps a formula that will do the following:

Count everyone that showed up on: Both Days, just day 1, just day 2 (three formulas)

I could then gather add those all together to get my total.

Any help would be greatly appreciated. Thanks.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Code:
=SUMPRODUCT(N(J11:J50&K11:K50="yy"))
this formula tells you how many students showed up on both day1 and day 2.
 
Upvote 0
Code:
=COUNTIFS(J11:J50,"y",K11:K50,"y")
do the same thing
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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