Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default Subtract 3 days from Date with a Twist Q

How could I expess a formula that will show -3 days from a certain
date, but if the answer is a weekend date then it must return the
previous friday

Example: Cell A2= 15/11/07, I must return -3 days from this is A1, but
this = 11/11/07 which is a weekend date, thus I require an answer of
09/11/07 i.e. a Friday

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default Subtract 3 days from Date with a Twist Q

Slight update on above, the 3 days I require to deduct cannot be
weekend dates

Eg. 12/11/07 is a Monday -3 days from this is 09/11/07 a Friday, but
the answer I require is 07/11/07 a Wednesday. Thus the -3 days
subtracted must be week days

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Subtract 3 days from Date with a Twist Q

=WORKDAY(A2,-4)

If you get a #NAME error:
ToolsAdd-ins, check Analysis Toolpak

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Sean" wrote in message oups.com...
| Slight update on above, the 3 days I require to deduct cannot be
| weekend dates
|
| Eg. 12/11/07 is a Monday -3 days from this is 09/11/07 a Friday, but
| the answer I require is 07/11/07 a Wednesday. Thus the -3 days
| subtracted must be week days
|
| Thanks
|
|
|


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Subtract 3 days from Date with a Twist Q

Checkout the workday() funtion in Help.
it will do what you want also adding in holidays if you want.
if you get the #NAME? error, install and load the Analysis ToolPak add-in.


"Sean" wrote:

Slight update on above, the 3 days I require to deduct cannot be
weekend dates

Eg. 12/11/07 is a Monday -3 days from this is 09/11/07 a Friday, but
the answer I require is 07/11/07 a Wednesday. Thus the -3 days
subtracted must be week days

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Subtract 3 days from Date with a Twist Q

=WORKDAY(A2,-3)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sean" wrote in message
oups.com...
Slight update on above, the 3 days I require to deduct cannot be
weekend dates

Eg. 12/11/07 is a Monday -3 days from this is 09/11/07 a Friday, but
the answer I require is 07/11/07 a Wednesday. Thus the -3 days
subtracted must be week days

Thanks







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Subtract 3 days from Date with a Twist Q

On Sat, 10 Nov 2007 04:36:39 -0800, Sean wrote:

Slight update on above, the 3 days I require to deduct cannot be
weekend dates

Eg. 12/11/07 is a Monday -3 days from this is 09/11/07 a Friday, but
the answer I require is 07/11/07 a Wednesday. Thus the -3 days
subtracted must be week days

Thanks



=workday(a1,-3)

If this function is not available, and returns the #NAME? error, install and
load the Analysis ToolPak add-in.

How?

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.

--ron
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default Subtract 3 days from Date with a Twist Q

Thanks all, smart function


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
How do I subtract/add a known number of days/months from a date? Alf Andersen Excel Worksheet Functions 2 August 1st 07 08:03 PM
How to subtract 2 dates to get number of days.....please Nick Excel Worksheet Functions 3 November 10th 06 01:03 PM
Subtract # of days from date, but if not sat, goto previous sat? Fernando Excel Discussion (Misc queries) 3 May 1st 06 08:57 PM
Add or Subtract Working Days in Excel alfa567 Excel Discussion (Misc queries) 2 March 20th 06 03:41 PM
excel formula that can subtract days Gofer Excel Worksheet Functions 3 December 3rd 04 06:10 PM


All times are GMT +1. The time now is 06:53 PM.

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"