Reputation: 1839
I have a column of dates as so...
I want to count the number of Saturdays (or any other day of the week), in this column. One solution would be two create an extra column with the weekday number in it, and then run a COUNTIF formula over that column, such as...
But I would prefer to not create a new column. How can I do this?
Upvotes: 2
Views: 3640
Reputation: 1
you don't need extra column, just:
=INDEX(COUNTIFS(WEEKDAY(A:A), 7, A:A, "<>"))
or shorter:
=COUNTA(FILTER(A:A, WEEKDAY(A:A)=7))
Upvotes: 0
Reputation: 1810
Try the following formula:
=filter(text(A:A,"dddd"),len(A:A))
and then:
=countif(filter(text(A:A,"dddd"),len(A:A)),"Sunday")
Upvotes: 2