Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Subtract 2 days and if it falls on Sat or Sun display Friday.

=WORKDAY(A1,-3)


"ScottG" wrote:

Date substraction - A1 has 4/2/2008 and I want to subtract three days.
Therefore, the answer is 3/30/2008 (Sunday) then I want to fall back to
Friday 3/28/2008.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Subtract 2 days and if it falls on Sat or Sun display Friday.

On Mon, 31 Mar 2008 22:20:01 -0700, Teethless mama
wrote:

=WORKDAY(A1,-3)



I don't believe that is what th OP asked.

Yours gives for Tuesday 4/1/2008 -- Thursday 3/27/2008

But 4/1/2008 less three days is Saturday 3/29/2008, so, by his request, you
should only fall bact to Friday, not Thursday.

"ScottG" wrote:

Date substraction - A1 has 4/2/2008 and I want to subtract three days.
Therefore, the answer is 3/30/2008 (Sunday) then I want to fall back to
Friday 3/28/2008.



=WORKDAY(A1-2,-1)
--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Subtract 2 days and if it falls on Sat or Sun display Friday.

The OP doesn't seem to have reached some servers, but it appears from the
quoted material that the subject line talked of subtracting 2 days whereas
the text talked of subtracting 3 days, so I'm not surprised that TM and Ron
were both confused. :-)

The next confusion occurs as to whether the OP wanted to count back in
working days (as TM's & Ron's formulae both do), or count back in days &
then (if a weekend) find the previous working day (as the subject line
implied).

Once the question is clear, hopefully somone can come up with a suitable
answer.
--
David Biddulph

"Ron Rosenfeld" wrote in message
...
On Mon, 31 Mar 2008 22:20:01 -0700, Teethless mama
wrote:

=WORKDAY(A1,-3)



I don't believe that is what th OP asked.

Yours gives for Tuesday 4/1/2008 -- Thursday 3/27/2008

But 4/1/2008 less three days is Saturday 3/29/2008, so, by his request,
you
should only fall bact to Friday, not Thursday.

"ScottG" wrote:

Date substraction - A1 has 4/2/2008 and I want to subtract three days.
Therefore, the answer is 3/30/2008 (Sunday) then I want to fall back to
Friday 3/28/2008.



=WORKDAY(A1-2,-1)
--ron



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Subtract 2 days and if it falls on Sat or Sun display Friday.

On Tue, 1 Apr 2008 13:37:59 +0100, "David Biddulph" <groups [at]
biddulph.org.uk wrote:

The next confusion occurs as to whether the OP wanted to count back in
working days (as TM's & Ron's formulae both do), or count back in days &
then (if a weekend) find the previous working day (as the subject line
implied).


My response was based on the quote showing the OP's example, where he
subtracted three ordinary days and then one (or two) more if the result was a
Saturday or Sunday. I never saw the original post, either.

But he should be initially counting back in days (and not workdays), because if
one counted back in Workdays, the result would never be a Saturday or Sunday.
--ron
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
Subtract 3 days from Date with a Twist Q Sean Excel Worksheet Functions 6 November 10th 07 02:00 PM
How to subtract 2 dates to get number of days.....please Nick Excel Worksheet Functions 3 November 10th 06 01:03 PM
set payment date 28 days after following friday rhydim Excel Discussion (Misc queries) 3 August 22nd 06 12:23 PM
Add or Subtract Working Days in Excel alfa567 Excel Discussion (Misc queries) 2 March 20th 06 03:41 PM
Subtract number of Working Days Casey Excel Worksheet Functions 2 August 19th 05 05:37 PM


All times are GMT +1. The time now is 10:00 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"