Calculation Issues

How to Calculate Weekly Hours from Monday to Sunday in Excel

Ayan MasoodAyan Masood Nov 10, 2026 869 views

Question details

Calculate and display a weekly total of hours specifically on Sundays, while leaving the cells for other weekdays blank.

How to Calculate Weekly Hours from Monday to Sunday
Product
Excel
Device & OS
not provided
Scenario
Tracking daily working hours and summarizing them weekly on the last day of the standard work week (Sunday).
Observed behavior
Requires a dynamic formula that checks if the current row's date is a Sunday and sums the hours from the preceding six days along with the current day, returning empty for non-Sundays.
Before you start

Ensure your dataset contains a column for Dates formatted correctly as date values, and that your data is sorted chronologically if using positional references.

Solution 1Recommended

Use IF, WEEKDAY, and SUMIFS to Calculate Weekly Totals

This is the most robust method. It conditionally sums the hours from the previous six days and the current date based on actual date values, ensuring accuracy even if some daily records are missing.

The SUMIFS function adds values based on multiple conditions. By combining it with the IF and WEEKDAY functions, we can instruct the spreadsheet to only perform the calculation when the date is a Sunday, effectively grouping Monday through Sunday.

1
Identify your data columns

Assume Column A contains your dates and Column C contains your daily logged hours.

2
Enter the formula

Select the cell where you want the first weekly total to appear (e.g., D2) and type: =IF(WEEKDAY(A2,2)=7,SUMIFS(C:C,A:A,">="&A2-6,A:A,"<="&A2),"")

3
Apply to the entire column

Press Enter, then click and drag the fill handle (the small square at the bottom right of the cell) down to apply this formula to all rows in your timesheet.

Use IF, WEEKDAY, and SUMIFS to Calculate Weekly Totals
How the Formula Works: The expression WEEKDAY(A2,2)=7 checks if the date is Sunday (the '2' sets Monday as day 1 and Sunday as day 7). SUMIFS then totals the hours in Column C where the dates in Column A fall exactly within the current Sunday and the 6 days prior to it.
Smart Spreadsheet Tool

Easily Track Timesheets with WPS Spreadsheet

WPS Spreadsheet fully supports advanced mathematical and logical functions like SUMIFS, OFFSET, and WEEKDAY. Manage your timesheets, calculate weekly totals accurately, and track payroll with ease.

  1. 1. Open your timesheet: Launch WPS Office and open your daily hours tracker spreadsheet.
  2. 2. Insert the weekly formula: Select the weekly total column and paste the SUMIFS calculation formula.
  3. 3. Drag to calculate: Drag the bottom-right corner of the cell to automatically calculate totals for all matching Sundays.
100% compatible with Microsoft Excel formulas and formats.Built-in templates for timesheets, attendance, and payroll tracking.Free, lightweight, and works seamlessly across PC, Mac, and mobile devices.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my weekly total formula return an error in the first few rows?

If you are using the OFFSET function, it attempts to look backwards by 6 rows. If your current row is too close to the top of the spreadsheet (e.g., row 3), there are not enough rows above it to fulfill the formula, resulting in a #REF! error. Wrap your formula in an IFERROR function to leave those cells blank.

How can I change the weekly total to display on Friday instead of Sunday?

You can modify the condition inside the WEEKDAY function. The formula uses WEEKDAY(A2,2)=7 to target Sunday. If you want Friday to be the trigger day, change the '7' to a '5' (e.g., WEEKDAY(A2,2)=5), since Monday is 1 and Friday is 5.

What happens if I have multiple time entries for the same date?

If you use the SUMIFS method, the formula looks at the actual date values in your column and accurately sums all hour entries that fall within the specified date range, regardless of how many rows there are. However, the OFFSET method will fail in this scenario, as it strictly counts physical rows.