Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
XL2000
I currently use the following formula to return the Friday before the 17th of the month if the 17th falls on a weekend: =DATE(YEAR(NOW()),MONTH(NOW()),17)-MAX(0,WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW ()),17),2)-5) (Excuse the wrapping, please) What I would like instead, is a formula to return the date of the following Monday if the 17th falls on a weekend. I don't want to use the Workday() function, because the file will often be viewed on machines that don't have the Analysis Toolpak available. Simple for someone who knows how(?), but not for me :( -- David |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Here's one way.... =DATE(YEAR(NOW()),MONTH(NOW()),17)+CHOOSE(WEEKDAY( DATE(YEAR(NOW()),MONTH(NOW()),17)),1,0,0,0,0,0,2) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=554353 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try:
=DATE(YEAR(NOW()),MONTH(NOW()),17)+8-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),17),2) -Simon "David" wrote: XL2000 I currently use the following formula to return the Friday before the 17th of the month if the 17th falls on a weekend: =DATE(YEAR(NOW()),MONTH(NOW()),17)-MAX(0,WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW ()),17),2)-5) (Excuse the wrapping, please) What I would like instead, is a formula to return the date of the following Monday if the 17th falls on a weekend. I don't want to use the Workday() function, because the file will often be viewed on machines that don't have the Analysis Toolpak available. Simple for someone who knows how(?), but not for me :( -- David |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
daddylonglegs wrote
Here's one way.... =DATE(YEAR(NOW()),MONTH(NOW()),17)+CHOOSE(WEEKDAY( DATE(YEAR(NOW()),MONT H(NOW()),17)),1,0,0,0,0,0,2) That works as desired. Many thanks. -- David |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This works under limited conditions, but fails to satisfy my requirements:
If the 17th falls outside the weekend (M-F), leave it as the 17th. It instead *always* returns the following Monday. Thanks for the effort anyway. -- David ?B?U2ltb25DQw==?= wrote Try: =DATE(YEAR(NOW()),MONTH(NOW()),17)+8-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW ()),17),2) -Simon "David" wrote: XL2000 I currently use the following formula to return the Friday before the 17th of the month if the 17th falls on a weekend: =DATE(YEAR(NOW()),MONTH(NOW()),17)-MAX(0,WEEKDAY(DATE(YEAR(NOW()),MONT H(NOW ()),17),2)-5) (Excuse the wrapping, please) What I would like instead, is a formula to return the date of the following Monday if the 17th falls on a weekend. I don't want to use the Workday() function, because the file will often be viewed on machines that don't have the Analysis Toolpak available. Simple for someone who knows how(?), but not for me :( -- David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Desperately need help with 3 calculations | Excel Worksheet Functions | |||
Find function | Excel Worksheet Functions | |||
Find function | Excel Worksheet Functions | |||
Date Calculations | Excel Worksheet Functions | |||
Multiple IF factors | Excel Worksheet Functions |