Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Formula for Week Ending Date: A How-To Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To get the week-ending date in Excel, use the formula =A1+7-WEEKDAY(A1,2) for a Sunday-ending week, or =A1+7-WEEKDAY(A1,3) for a Monday-ending week, where A1 holds your date. This returns the last day of the week containing that date. You can then format the result as a date. The formula works in Excel for Microsoft 365, Excel 2019, 2016, and most earlier versions; menu labels may differ slightly by version or region.

What You'll Need

  • A version of Excel that supports the WEEKDAY function (all modern versions do).
  • A column of dates you want to convert, with each date in its own cell and formatted as a valid Excel date (not text).
  • An empty column next to your dates for the formula results.

Step-by-Step

  1. Check your date format. Select a date cell and look at the formula bar. If it shows a date like 5/15/2024, it is a real date. If it shows text like "May 15, 2024" aligned left, convert it first using Data > Text to Columns or by re-entering it in a recognized date format. The formula will not work correctly on text dates.
  2. Decide which day ends your week. Common choices are Sunday, Saturday, or Friday. The WEEKDAY function's second argument controls this: use 1 or omit it for weeks ending Saturday, 2 for weeks ending Sunday, 3 for weeks ending Monday, and so on up to 7 for weeks ending Friday. For example, WEEKDAY(A1,2) returns 1 for Monday through 7 for Sunday, so the week ends on Sunday.
  3. Enter the formula in the first empty cell. Click the cell next to your first date (say B2 if your date is in A2). Type =A2+7-WEEKDAY(A2,2) for a Sunday-ending week, or adjust the second argument as needed. Press Enter. The cell should display a date.
  4. Format the result as a date. If the result appears as a number (e.g., 45423), select the cell, right-click, choose Format Cells, go to the Number tab, and pick Date. Choose a format like MM/DD/YYYY or DD-MMM-YY. Click OK.
  5. Copy the formula down. Drag the fill handle (the small square at the bottom-right of the cell) down to fill the formula for all your dates. Each row will show its week-ending date.
  6. Optional: Calculate week-ending dates for a whole week number. If you have a week number and year, use =DATE(year,1,1)+7*weeknumber-WEEKDAY(DATE(year,1,1),2) to get the Sunday of that week. Adjust the weekday argument as needed.
  7. Optional: Use a named range or table. Convert your data to an Excel Table (Insert > Table) so formulas auto-fill when you add new rows. The formula will use structured references like =[@Date]+7-WEEKDAY([@Date],2).

Common Mistakes

  • Using the wrong weekday argument. Forgetting that WEEKDAY defaults to Sunday=1 can shift your week-ending day by one. Always specify the second argument explicitly.
  • Dates stored as text. If your dates are left-aligned or have a leading apostrophe, formulas will return errors or wrong results. Convert them to real dates first.
  • Not formatting the result. Excel may show a serial number instead of a date. Apply date formatting to the result column.
  • Assuming the formula works for any start day. The formula =A1+7-WEEKDAY(A1,2) always returns a Sunday. To end on a different day, change the second argument (e.g., 3 for Monday).
  • Copying without adjusting references. If you copy the formula to another column without relative references, it may point to the wrong cells. Use relative references (like A2) unless you intentionally need absolute ones.

Tips

  • To get the week-ending date for a week starting on a given date, use =A1+6-WEEKDAY(A1,2) for a Saturday end, or adjust accordingly.
  • Use =TEXT(A1+7-WEEKDAY(A1,2),"ddd, mmm d, yyyy") to display the result as text with the day name.
  • If you need the week number, use =WEEKNUM(A1,2) for weeks starting Monday, or =ISOWEEKNUM(A1) for ISO week numbers.
  • Combine with IF to handle blank cells: =IF(A1="","",A1+7-WEEKDAY(A1,2)).
  • For fiscal weeks, adjust the weekday argument to match your fiscal calendar.

Troubleshooting

  • Formula returns #VALUE! error. The date cell likely contains text. Check by selecting the cell and looking at the formula bar; if it shows text, convert it to a date using Data > Text to Columns or by re-entering it.
  • Result is a number like 45423. Format the cell as a date: right-click > Format Cells > Date.
  • Week-ending day is off by one. Double-check the second argument of WEEKDAY. Remember: 1=Saturday, 2=Sunday, 3=Monday, etc. If you omit it, Excel uses 1 (Saturday).
  • Formula doesn't fill correctly. Ensure you are dragging the fill handle, not just copying. Alternatively, double-click the fill handle to auto-fill down to the last adjacent cell.
  • Dates before 1900. Excel's date system starts at January 1, 1900. Dates before that may cause errors; use the 1904 date system if needed (File > Options > Advanced > When calculating this workbook).

Frequently Asked Questions

How do I get the week-ending date for a Monday-ending week?

Use =A1+7-WEEKDAY(A1,3). The second argument 3 makes WEEKDAY return 1 for Tuesday through 7 for Monday, so the formula returns the Monday of that week.

Can I use this formula for a week that ends on Friday?

Yes. Use =A1+7-WEEKDAY(A1,7). Argument 7 makes WEEKDAY return 1 for Saturday through 7 for Friday, so the result is the Friday of the week.

Why does my formula return a date from the previous week?

If the date in A1 is already the week-ending day, the formula returns the same date. If it returns a previous week, check that your WEEKDAY argument matches your intended week-ending day. For example, if you want Sunday-ending weeks but use argument 1, you'll get Saturday-ending weeks, which may appear as a day earlier.

Can I calculate the week-ending date for a whole column at once?

Yes. Enter the formula in the first cell, then drag the fill handle down or double-click it to fill the column. Alternatively, convert your data to an Excel Table and use structured references for automatic filling.

What if my dates are in a different format, like DD/MM/YYYY?

The formula works regardless of display format as long as the cell contains a valid Excel date. Excel stores dates as serial numbers, so the display format does not affect calculations. Just ensure the cell is formatted as a date, not text.

Is there a built-in function for week-ending dates?

No, Excel does not have a dedicated function for week-ending dates. The WEEKDAY function combined with simple arithmetic is the standard approach.