Sum values by weeknum or weekday in Excel
This tutorial demonstrates formulas step-by-step to help you sum values in a certain range based on the specified week number or weekday in Excel.
How to sum values by week number in Excel?
How to sum values by weekday in Excel?
How to sum values by week number in Excel?
As shown in the screenshot below, to sum values in the Amount column based on the dates in which a given week number falls, we provide two formulas.
Generic Formulas
=SUMIFS( value_range, helper_column_range, week_number)
=SUMPRODUCT(--(WEEKNUM(date_range+0,1)=week_number),value_range)
Arguments
How to use this formula?
Using the SUMIFS formula and a helper column
To use the SUMIFS formula, first, you need to apply the WEEKNUM function to create a helper column to calculate the corresponding week numbers for the dates in the Date column.
=WEEKNUM (serial_num, [return_type])
The WEEKNUM function returns the week number of the given date in a year.
1. In this case, I select a cell (F5) next to the first value in the Amount column.
2. Enter the below formula into it and press the Enter key to get the week number of the first date. Select the result cell and then drag its AutoFill Handle down to get the other week numbers. See screenshot:
=WEEKNUM(C5)
3. Select a cell to output the total amount, enter the below formula into it and press the Enter key. Select this result cell, drag its AutoFill Handle down to get the other results.
=SUMIFS($E$5:$E$14, $F$5:$F$14, H6)
Using the SUMPRODUCT formula
You don’t need to create a helper column when using the SUMPROFUCT formula to solve this problem.
1. Select a blank cell, enter the below formula into it and press the Enter key.
=SUMPRODUCT(--(WEEKNUM($C$5:$C$14+0,1)=G6),$E$5:$E$14)
2. Select the result cell, drag its AutoFill Handle down to get the other results according to your needs.
Explanation of the formula
=SUMIFS($E$5:$E$14, $F$5:$F$14, H6)
=SUMPRODUCT(--(WEEKNUM($C$5:$C$14+0,1)=G6),$E$5:$E$14)
How to sum values by weekday in Excel?
As shown in the screenshot below, to sum values in the Amount column by the certain weekday in Excel, you can apply the SUMPRODUCT function together with the WEEKDAY function to get it done.
In this case, since we need to sum the total amount for each weekday, before applying the formula, we create a helper column with numbers 1 to 7 to separately indicate Monday to Sunday.
Generic formula
=SUMPRODUCT((WEEKDAY(date_range,2)=weekday_number)*value_range)
Arguments
How to use this formula?
1. Select a cell next to the number 1 cell. Here I select I6.
2. Copy or enter the below formula into it and press the Enter key. Select the result cell, and then drag its AutoFill Handle down to get the results for other weekdays.
=SUMPRODUCT((WEEKDAY($C$5:$C$14,2)=H6)*$E$5:$E$14)
Note: If you just need to sum values based on one specified weekday such as Friday, you can directly enter the number 5 in the formula as follows.
=SUMPRODUCT((WEEKDAY($C$5:$C$14,2)=5)*$E$5:$E$14)
Explanation of the formula
=SUMPRODUCT((WEEKDAY($C$5:$C$14,2)=H6)*$E$5:$E$14)
Related functions
Excel WEEKNUM function
The Excel SUMIFS function returns the week number of the given date in a year, which starts counting weeks from January 1.
Excel SUMPRODUCT function
The Excel SUMPRODUCT function can be used to multiply two or more columns or arrays together, and then get the sum of products.
Excel WEEKDAY function
The Excel EOMONTH function returns an integer number from 1 to 7 to represent the day of the week for a given date in Excel.
Related formulas
Sum values by month (with or without year)
This tutorial demonstrates two formulas in detail to help summing values by certain month and year or summing values by certain month ignore year in Excel.
Sum values by the week of a given date
This tutorial talks about how to sum values by the week in which a given date falls
Sum every n rows or columns in a range
This tutorial explains two formulas based on the SUM and OFFSET functions to sum every n rows or columns in a specified range in Excel.
Sum every nth row or column in a range
This tutorial is going to show you how to create a formula based on the SUMPRODUCT, MOD and COLUMN functions to sum every nth row or column in a range in Excel.
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...
Supports Office/Excel 2007-2021 & newer, including 365 | Available in 44 languages | Full-featured 30-day free trial.

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
