Rounding to the following Sunday

SPOATO

New Member
Joined
Sep 7, 2018
Messages
2
Racking my brain to get the following to work: =IFERROR(IF(D5=0,"",D5+45),IF(D5="","",D5+7-MOD(D5-1,7)))

D5 being the source date that I'm adding 45 days to and then rounding to the following Sunday. Honestly wouldn't mind figuring out the previous Sunday as well. We are trying to set ordering dates to Sunday to help with Monday through Friday scheduling. I've been using Numbers iOS/Mac for the past 2-3 years so my Excel is very rusty. Any help is GREATLY appreciated.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Spoato, assuming that the date is in cell [D5] try this:

=D5-WEEKDAY(D5) - truncated to the previous Sunday

=D5+7-WEEKDAY(D5) - rounded to the next Sunday


The fun starts here: http://www.excelunusual.com
 
Last edited:
Upvote 0
Spoato, assuming that the date is in cell [D5] try this:

=D5-WEEKDAY(D5) - truncated to the previous Sunday

=D5+7-WEEKDAY(D5) - rounded to the next Sunday


The fun starts here: http://www.excelunusual.com

Thx,geo77

As a single statement it works perfectly. I keep getting errors when changing the second statement from current formula. I need both to run in order, but as shown will only process the first statement.

Side note, digging your work on the link.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top