Forum Discussion
Count the number of dates that fall within a certain month
- Feb 29, 2024
In general that could be
=SUMPRODUCT( ( IFERROR( N(MONTH($B$2:$D$7)), 0) = MONTH($F2) ) * ( IFERROR( N(YEAR($B$2:$D$7)), 0) = YEAR($F2) )* ISODD( ROW($B$2:$D$7) ) )
by adding one more criteria. Details depends on content, do you mean odd row within the grid, or odd row counting from the start of the range.
Just an advanced question: is it also possible to look only look for the dates in odd rows with the same formula?
In general that could be
=SUMPRODUCT(
( IFERROR( N(MONTH($B$2:$D$7)), 0) = MONTH($F2) ) *
( IFERROR( N(YEAR($B$2:$D$7)), 0) = YEAR($F2) )*
ISODD( ROW($B$2:$D$7) )
)
by adding one more criteria. Details depends on content, do you mean odd row within the grid, or odd row counting from the start of the range.
- BourrinhoApr 02, 2024Copper Contributor
Wondering if it's possible to add an additional criterion. Like in below example calculate how many registrations in a certain month but only for new students (so only for those indicated with "Yes" in column C). Or in other words, an automated count in the cells in yellow.
- SergeiBaklanMar 01, 2024Diamond Contributor
Great to know, thank you for the feedback
- BourrinhoMar 01, 2024Copper ContributorThanks, could make it all work!
- SergeiBaklanFeb 29, 2024Diamond Contributor
When you need to do that column by column. Registration dates are in even rows, competition ones - in odd rows.
Applied to columns separately mentioned formula shall work.
- BourrinhoFeb 29, 2024Copper Contributor
I mean odd row within the grid. Like in example below, in the columns C and E the even rows show the window for the activity, while the odd rows represent the actual date. I would like to count the months like in the table on the right. For the registrations, your earlier formula worked. For the completions, I would need to exclude the even rows since the windows of completion don't have to be counted.
My apologies for these additional questions. But while "playing around" new ideas come up