
=SUMPRODUCT(--(WEEKDAY(dates)=day_num))
Related formulas
Sum by weekday
To count dates by weekday (i.e. count Mondays, Tuesdays, Wednesdays, etc.), you can use the SUMPRODUCT function together with the WEEKDAY function.
In the example shown, the formula in H4 is:
=SUMPRODUCT(--(WEEKDAY(dates,2)=G4))
You might wonder why we aren't using COUNTIF or COUNTIFs? These seem like an obvious solution, but, without adding a helper column with a weekday value, there is no way to create a criteria for COUNTIF that takes into account weekday.
Instead, we use the versatile SUMPRODUCT function, which handles arrays gracefully without the need to use Control + Shift + Enter.
We are using SUMPRODUCT with just one argument, which consists of this expression:
--(WEEKDAY(dates,2)=G4)
Working from the inside out, the WEEKDAY function is configured with the optional argument 2, which causes it to return numbers 1-7 for the days Monday-Sunday, respectively. This isn't strictly necessary, but it makes it easier to list the days in order with the numbers in column G in sequence.
WEEKDAY then evaluates each value in the named range "dates" and returns a number. The result is an array like this:
{3;6;3;1;2;2;4;2}
The numbers returned by WEEKDAY are then compared to the value in G4, which is 1.
{3;6;3;1;2;2;4;2}=1
The result is an array of TRUE/FALSE values.
{FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE}
SUMPRODUCT only works with numbers (not text or booleans) so we use the double-negative to coerce the TRUE/FALSE values to one's and zeros:
{0;0;0;1;0;0;0;0}
With just this single array to process, SUMPRODUCT sums the items and returns the result.

=SUMPRODUCT(--(WEEKDAY(dates)=day_num))
Related formulas
Sum by weekday
To count dates by weekday (i.e. count Mondays, Tuesdays, Wednesdays, etc.), you can use the SUMPRODUCT function together with the WEEKDAY function.
In the example shown, the formula in H4 is:
=SUMPRODUCT(--(WEEKDAY(dates,2)=G4))
You might wonder why we aren't using COUNTIF or COUNTIFs? These seem like an obvious solution, but, without adding a helper column with a weekday value, there is no way to create a criteria for COUNTIF that takes into account weekday.
Instead, we use the versatile SUMPRODUCT function, which handles arrays gracefully without the need to use Control + Shift + Enter.
We are using SUMPRODUCT with just one argument, which consists of this expression:
--(WEEKDAY(dates,2)=G4)
Working from the inside out, the WEEKDAY function is configured with the optional argument 2, which causes it to return numbers 1-7 for the days Monday-Sunday, respectively. This isn't strictly necessary, but it makes it easier to list the days in order with the numbers in column G in sequence.
WEEKDAY then evaluates each value in the named range "dates" and returns a number. The result is an array like this:
{3;6;3;1;2;2;4;2}
The numbers returned by WEEKDAY are then compared to the value in G4, which is 1.
{3;6;3;1;2;2;4;2}=1
The result is an array of TRUE/FALSE values.
{FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE}
SUMPRODUCT only works with numbers (not text or booleans) so we use the double-negative to coerce the TRUE/FALSE values to one's and zeros:
{0;0;0;1;0;0;0;0}
With just this single array to process, SUMPRODUCT sums the items and returns the result.