Rounding to nearest specified day

Laurence83

New Member
Joined
Jun 1, 2016
Messages
19
Hi,

I've a bunch of school term dates, and each school has their own method of stating what is the first day or last day of the month (some will say the day before is the first day, some will say the day after, some will say the last week day, etc) & to allow me to better compare i want to be able to round those to a specified day of the week, so that every first day of term is a Monday and every last day of term is a Sunday

So for example School 1 says term begins on Wed 9th Jan 2019, school 2 says terms being on Sundays 6th Jan 2019, school 3 says terms begins on Friday 11th Jan 2019. For the first two i'd want these rounded to Monday 7th Jan 2019, but the third would be Monday 14th Jan 2019.

I've not been able to find/work out a formula that'll do this.

Any help or suggestion is greatly appreciated.

Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Assuming I understand the brief, try:

=IF(WEEKDAY(A1,1)<5,FLOOR(A1,7),CEILING(A1,7))+2
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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