Is there a EOWEEK?

rickblunt

Well-known Member
Joined
Feb 18, 2008
Messages
609
Office Version
  1. 2019
Platform
  1. Windows
Greetings, I know of the EOMONTH function, but is there an "end of week" function? I can't see one when I search for it in Excel. My application is that when working with future dates, I would like to automatically adjust the date for the end of the week as opposed to a Wednesday or Thursday.

For example, if I enter a date for "today()+7", I would like to return the value to reflect the date for next Saturday. Hope that makes sense. Thanks for the help, RB
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Greetings, I know of the EOMONTH function, but is there an "end of week" function? I can't see one when I search for it in Excel. My application is that when working with future dates, I would like to automatically adjust the date for the end of the week as opposed to a Wednesday or Thursday.

For example, if I enter a date for "today()+7", I would like to return the value to reflect the date for next Saturday. Hope that makes sense. Thanks for the help, RB


This will replicate the OEMONTH function but for weeks... set for mon-sun, but your worksheet function can have a -1 to get to saturday.

Function EOWEEK(start_date As Date, weeks As Double)
EOWEEK = start_date + 7 + (7 * weeks) - WorksheetFunction.Weekday(start_date, 2)
End Function
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,288
Members
448,563
Latest member
MushtaqAli

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