FormulaCraft

How to sum values by day of the week in Excel and Google Sheets

Topic:SUM & aggregation
Excel & Google Sheets
=SUMPRODUCT(($B$2:$B$5)*(WEEKDAY($A$2:$A$5,2)=1))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Ensure your date column (e.g. A) contains real date values.
  2. 2Use WEEKDAY with mode 2 (Monday=1, Sunday=7) to number the days: WEEKDAY($A$2:$A$100,2)=1 produces TRUE/FALSE for Mondays.
  3. 3Multiply by the value column inside SUMPRODUCT: =SUMPRODUCT(($B$2:$B$100)*(WEEKDAY($A$2:$A$100,2)=1)). Change =1 to =2 for Tuesdays, =6 for Saturdays, =7 for Sundays.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

How do I sum only weekdays (Monday to Friday) in one formula?

Use =SUMPRODUCT(($B$2:$B$100)*(WEEKDAY($A$2:$A$100,2)<=5)) which includes all days where the WEEKDAY mode-2 result is 5 or less (Monday through Friday).

How do I sum only weekends (Saturday and Sunday)?

Use =SUMPRODUCT(($B$2:$B$100)*(WEEKDAY($A$2:$A$100,2)>5)) — mode-2 returns 6 for Saturday and 7 for Sunday, so >5 captures both.

Can I sum by multiple specific weekdays at once, like Monday and Wednesday?

Yes: =SUMPRODUCT(($B$2:$B$100)*((WEEKDAY($A$2:$A$100,2)=1)+(WEEKDAY($A$2:$A$100,2)=3))) — the + acts as logical OR inside SUMPRODUCT.

How do I exclude holidays from the weekday sum?

Combine with NETWORKDAYS logic: =SUMPRODUCT(($B$2:$B$100)*(WEEKDAY($A$2:$A$100,2)<=5)*(ISNA(MATCH($A$2:$A$100,Holidays,0)))) where Holidays is a named range of holiday dates.

How do I group totals by week (e.g. weekly subtotals)?

Use WEEKNUM instead of WEEKDAY: =SUMPRODUCT(($B$2:$B$100)*(WEEKNUM($A$2:$A$100,2)=E2)) where E2 holds the week number you want.

Why is my result showing as a date or strange number?

The result cell inherited date formatting from the source. Select the cell, press Ctrl+1, and switch to Number or Currency format.

Does this work the same way in Google Sheets?

Yes — SUMPRODUCT and WEEKDAY behave identically in Sheets, with the same mode-1/mode-2 semantics. The formula above pastes in unchanged.

More on SUM & aggregation

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: