Note: The other languages of the website are Google-translated. Back to English

How to round date to previous or next specific weekday in Excel?

doc-round-to-previous-sunday-1
Sometimes, you may need to get the previous or next specific weekday such as Sunday based on a date as left screenshot shown. Here this tutorial provides two formulas for handling this job easily in Excel.
Round date to next specific weekday
Round date to previous specific weekday

arrow blue right bubble Round date to next Specific weekday

For example, here to get the next Sunday of the dates in column A

1. Select a cell which you want to place the next Sunday date, then paste or enter below formula:

=IF(MOD(A2-1,7)>7,A2+7-MOD(A2-1,7)+7,A2+7-MOD(A2-1,7))

2. Then press Enter key to get the first next Sunday, which is displayed as a 5-digit number, then drag auto fill down to get all results.

doc-round-to-previous-sunday-1

3. Then keep the formula cells selected, press Ctrl + 1 keys to display the Format Cells dialog, then under Number tab, select Date and choose one date type from right list as you need. Click OK.

doc-round-to-previous-sunday-1

Now the formula results have been shown in date format.

doc-round-to-previous-sunday-1

For getting next other weekday, please use below formulas:

Weekday Formula
Sunday =IF(MOD(A2-1,7)>7,A2+7-MOD(A2-1,7)+7,A2+7-MOD(A2-1,7))
Saturday =IF(MOD(A2-1,7)>6,A2+6-MOD(A2-1,7)+7,A2+6-MOD(A2-1,7))
Friday =IF(MOD(A2-1,7)>5,A2+5-MOD(A2-1,7)+7,A2+5-MOD(A2-1,7))
Thursday =IF(MOD(A2-1,7)>4,A2+4-MOD(A2-1,7)+7,A2+4-MOD(A2-1,7))
Wednesday =IF(MOD(A1-1,7)>3,A1+3-MOD(A1-1,7)+7,A1+3-MOD(A1-1,7))
;Tuesday =IF(MOD(A1-1,7)>2,A1+2-MOD(A1-1,7)+7,A1+2-MOD(A1-1,7))
Monday =IF(MOD(A1-1,7)>1,A1+1-MOD(A1-1,7)+7,A1+1-MOD(A1-1,7))

arrow blue right bubble Round date to previous Specific weekday

For example, here to get the previous Sunday of the dates in column A

1. Select a cell which you want to place the next Sunday date, then paste or enter below formula:

=A2-WEEKDAY(A2,2)

2. Then press Enter key to get the first next Sunday, then drag auto fill down to get all results.

doc-round-to-previous-sunday-1

If you want to change the date format, keep the formula cells selected, press Ctrl + 1 keys to display the Format Cells dialog, then under Number tab, select Date and choose one date type from right list as you need. Click OK.

doc-round-to-previous-sunday-1

Now the formula results have been shown in date format.

doc-round-to-previous-sunday-1

For getting previous other weekday, please use below formulas:

Weekday Formula
Sunday =A2-WEEKDAY(A2,2)
Saturday =IF(WEEKDAY(A2,2)>6,A2-WEEKDAY(A2,1),A2-WEEKDAY(A2,2)-1)
Friday =IF(WEEKDAY(A2,2)>5,A2-WEEKDAY(A2,2)+5,A2-WEEKDAY(A2,2)-2)
Thursday =IF(WEEKDAY(A2,2)>4,A2-WEEKDAY(A2,2)+4,A2-WEEKDAY(A2,2)-3)
Wednesday =IF(WEEKDAY(A2,2)>3,A2-WEEKDAY(A2,2)+3,A2-WEEKDAY(A2,2)-4)
;Tuesday =IF(WEEKDAY(A2,2)>2,A2-WEEKDAY(A2,2)+2,A2-WEEKDAY(A2,2)-5)
Monday =IF(WEEKDAY(A2,2)>1,A2-WEEKDAY(A2,2)+1,A2-WEEKDAY(A2,2)-6)

Powerful Date & Time Helper

The Date & Time Helper feature of Kutools for Excel, supports easily add/subtract date time, calculate difference between two dates, and calcualte age based on birthday.  Click for free trial!
doc-round-to-previous-sunday-1
 
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation.


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office / Excel 2007-2021 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Your round to previous Sunday is flawed. Even shows as much on your sheet.
This comment was minimized by the moderator on the site
So, what would be the correct formula to first check to see if a cell has a date, else leave it blank and make the date the fall on a Friday before if the date falls on a Saturday or Sunday?
This comment was minimized by the moderator on the site
I found a workaround for to the previous Friday. You can change the switch "results" as needed to round to different days.=H3-SWITCH(TEXT(H3, "DDD"), "Mon", 3, "Tue", 4, "Wed", 5, "Thu", 6, "Fri", 0, "Sat", 1, "Sun", 2)
=[date]-SWITCH(TEXT([date], "DDD"), "Mon", 3, "Tue", 4, "Wed", 5, "Thu", 6, "Fri", 0, "Sat", 1, "Sun", 2)
This comment was minimized by the moderator on the site
hi guys,

I used the formula below, I hope it works for you.
IF(WEEKDAY(H2,16)<>7,(7-WEEKDAY(H2,16))+H2,H2) where H2 is the date that you want to round up to the next day of the week (in my case for Friday) and the 16 is the format to start the date with Saturday as #1 and Friday as #7.
This comment was minimized by the moderator on the site
Si quiero la fecha del próximo viernes cómo debo modificar las variables? Gracias
This comment was minimized by the moderator on the site
Sorry, I cannot understand, could you speak in English?
This comment was minimized by the moderator on the site
I put this into google sheets and to make the dates become next thursday but I have not been able to get it to work especially for the dates right after thursdays. =IF(L2="","",L2+4-MOD(L2-1,4)) is the function i used to make it thursday but not all dates were thursday.
This comment was minimized by the moderator on the site
I put this into google sheets and to make the dates become next thursday but I have not been able to get it to work especially for the dates right after thursdays. =IF(L2="","",L2+4-MOD(L2-1,4)) is the function i used to make it thursday but not all dates were thursday.
This comment was minimized by the moderator on the site
to clarify, all dates become thursday, but friday and saturday will not convert to the next weeks thursday instead they will go back a day or two to the previous thursday instead going to next weeks thursday, is there any way to fix this in the function =IF(L4="","",L4+4-MOD(L4-1,7))
This comment was minimized by the moderator on the site
Hi Kisho,
I use the formula below to round to the next Thursday where A1 is the cell with your original date and 14 is for Thursday. You can use other numbers for other days if required. 11=Monday, 12=Tuesday, 13=Wednesday, etc...
Also, you can use a 1 instead of an 8 to get the Thursday before your original date in A1. If your original date is already a Thursday the formula will produce the same date as in A1.
I hope this helps!
=A1+(0-WEEKDAY(A1,14)+8)
This comment was minimized by the moderator on the site
Hi Kisho,

I use the formula below to round to the next Thursday where A1 is the cell with your original date and 14 is for Thursday. You can use other numbers for other days if required. 11=Monday, 12=Tuesday, 13=Wednesday, etc...

Also, you can use a 1 instead of an 8 to get the Thursday before your original date in A1. If your original date is already a Thursday the formula will produce the same date as in A1.

I hope this helps!

=A1+(0-WEEKDAY(A1,14)+8)
This comment was minimized by the moderator on the site
Hi Everyone,
I use the formula below to round to the next Thursday where A1 is the cell with your original date and 14 is for Thursday. You can use other numbers for other days if required. 11=Monday, 12=Tuesday, 13=Wednesday, etc...

Also, you can use a 1 instead of an 8 to get the Thursday before your original date in A1. If your original date is already a Thursday the formula will produce the same date as in A1.

I hope this helps!

=A1+(0-WEEKDAY(A1,14)+8)
This comment was minimized by the moderator on the site
Thank you! This worked :)
This comment was minimized by the moderator on the site
Im trying to work out how to use a date, less an amount of days but ensure when subtracting the days it lands on a weekday not a weekend.
Any formulas??
This comment was minimized by the moderator on the site
I have tested this but partially incorrect result was out. Why ?
I wanted to get next Friday.

=IF(A2="","",A2+5-Mod(A2-1,7))

I have entered 11/19/2022
The result was past day 11/18/2022
This comment was minimized by the moderator on the site
Thanks for your reminder, the original formula is not enough rigorous indeed. I have updated the formulas and rewrited the tutorial, hope the new formulas can help you.
There are no comments posted here yet

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL