Home > Back-end >  Calculate number of mondays in google spreadsheet
Calculate number of mondays in google spreadsheet

Time:04-28

Can you please tell me how to count the number of Mondays in a column with dates in a Google spreadsheet?

enter image description here

CodePudding user response:

Make sure your field is date format, then run this formula: A1 to A24 is your cells for calculation.

=SUMPRODUCT(--(WEEKDAY(A1:A24)=2))

CodePudding user response:

You may try FILTER() function.

=COUNT(FILTER(A2:A7,WEEKDAY(A2:A7)=2))

Or direct day name.

=COUNT(FILTER(A2:A7,TEXT(A2:A7,"dddd")="Monday"))

enter image description here

CodePudding user response:

Create a new column with a formula like this:

=--(WEEKDAY(A1)=2)

where A1 is the date in your example.

That new column will contain a 1 for mondays, and 0 for anything else. From there you can just sum the new column to get the # of mondays.

  • Related