Countif Month for Attendance Sheet

NCF11

New Member
Joined
Oct 29, 2019
Messages
1
I am making an attendance sheet to count the number of times a person is present in a certain month. (url to photo of sheet attached)

Column A is Dates, and Columns C-D lists "yes" if present on that date and "no" if not present on that date.

Column G lists months (Feb, Mar, April..), and in Columns I-K, I want to count the number of times "yes" appears in the corresponding column in a certain month.

I am having trouble using the Month() function inside the Countifs() function.

-Thanks!

NCF


EDIT: Sorry, this is the url to the photo: https://postimg.cc/QVjb3X57

QVjb3X57
QVjb3X57
 
Last edited by a moderator:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the Board!

You can't use MONTH() inside a COUNTIFS functions, at least not the way you're envisioning. Instead you need to create 2 conditions, one for the start date, and one for the end date. If your dates in column G are actually the 1st of each month, then try:


Book1
ABCDEFGHIJK
1PersonPersonPersonPersonPersonPerson
2Date123Date123
3
44-Feb-19NoYesYesFeb-19022
511-Feb-19NoYesYesMar-19022
611-Mar-19NoYesYesApr-19033
721-Mar-19NoYesYes
81-Apr-19NoYesYes
922-Apr-19NoYesYes
1029-Apr-19NoYesYes
Sheet1
Cell Formulas
RangeFormula
I4=COUNTIFS($A:$A,">="&$G4,$A:$A,"<="&EOMONTH($G4,0),INDEX($C:$E,0,MATCH(I$2,$C$2:$E$2,0)),"Yes")


If you want to use MONTH(), then you could use SUMPRODUCT instead of COUNTIFS, but that requires a different approach.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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