Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default Help change Friday to following Monday

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   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default Help change Friday to following Monday


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   Report Post  
Posted to microsoft.public.excel.misc
SimonCC
 
Posts: n/a
Default Help change Friday to following Monday

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   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default Help change Friday to following Monday

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   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default Help change Friday to following Monday

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Desperately need help with 3 calculations Scoooter Excel Worksheet Functions 3 June 12th 06 04:28 PM
Find function alamo Excel Worksheet Functions 1 September 16th 05 02:01 PM
Find function alamo Excel Worksheet Functions 1 September 16th 05 12:47 PM
Date Calculations Bruce Excel Worksheet Functions 11 May 19th 05 01:09 AM
Multiple IF factors kamille824 Excel Worksheet Functions 4 March 12th 05 01:34 AM


All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"