Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default how do i know date after no. of working days

I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng days .
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)

I need formula to execute that and how to implement it in shared workbooks ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default how do i know date after no. of working days

Use the WORKDAY function:

=WORKDAY(start_date,days)

or you can add a third parameter relating to holidays.

You need to install the Analysis ToolPak for this to work if you are
using Excel 2003 or earlier - see Excel Help for further details.

Hope this helps.

Pete

On Oct 3, 4:32*pm, sudheer wrote:
I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng days .
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)

I need formula to execute that and how to implement it in shared workbooks ?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how do i know date after no. of working days

Give the following function a try...

Function AddWorkDays(StartDate As Date, WorkDays As Long) As Date
If WorkDays < 0 Then Exit Function
AddWorkDays = DateAdd("d", 7 * (WorkDays \ 5) + (WorkDays Mod 5) - _
2 * ((WorkDays Mod 5) Abs(5 + - _
Weekday(StartDate, vbMonday))) + _
Weekday(StartDate, vbSaturday) * _
(Weekday(StartDate, vbSaturday) < 3), StartDate)
End Function

As written, this function will only *add* workdays to the StartDate. If the
WorkDays value is less than 0, then "day zero" (12/30/1899) is returned and
can be used for error checking purposes.

--
Rick (MVP - Excel)


"sudheer" wrote in message
...
I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng days
.
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)

I need formula to execute that and how to implement it in shared workbooks
?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how do i know date after no. of working days

It just occurred to me that my solution (a VB coded solution) is probably
not what you were looking for. I had just posted some answers over in the
programming newsgroup and forgot that I was not still in that newsgroup when
I posted my answer to you. I think Pete's answer is the one you are looking
for.

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Give the following function a try...

Function AddWorkDays(StartDate As Date, WorkDays As Long) As Date
If WorkDays < 0 Then Exit Function
AddWorkDays = DateAdd("d", 7 * (WorkDays \ 5) + (WorkDays Mod 5) - _
2 * ((WorkDays Mod 5) Abs(5 + - _
Weekday(StartDate, vbMonday))) + _
Weekday(StartDate, vbSaturday) * _
(Weekday(StartDate, vbSaturday) < 3), StartDate)
End Function

As written, this function will only *add* workdays to the StartDate. If
the WorkDays value is less than 0, then "day zero" (12/30/1899) is
returned and can be used for error checking purposes.

--
Rick (MVP - Excel)


"sudheer" wrote in message
...
I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng
days .
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)

I need formula to execute that and how to implement it in shared
workbooks ?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default how do i know date after no. of working days

I thought that was a bit OTT, Rick !! <bg

Pete

On Oct 3, 5:12*pm, "Rick Rothstein"
wrote:
It just occurred to me that my solution (a VB coded solution) is probably
not what you were looking for. I had just posted some answers over in the
programming newsgroup and forgot that I was not still in that newsgroup when
I posted my answer to you. I think Pete's answer is the one you are looking
for.

--
Rick (MVP - Excel)

"Rick Rothstein" wrote in message

...



Give the following function a try...


Function AddWorkDays(StartDate As Date, WorkDays As Long) As Date
*If WorkDays < 0 Then Exit Function
*AddWorkDays = DateAdd("d", 7 * (WorkDays \ 5) + (WorkDays Mod 5) - _
* * * * * * * * * * * *2 * ((WorkDays Mod 5) Abs(5 + - _
* * * * * * * * * * * *Weekday(StartDate, vbMonday))) + _
* * * * * * * * * * * *Weekday(StartDate, vbSaturday) * _
* * * * * * * * * * * *(Weekday(StartDate, vbSaturday) < 3), StartDate)
End Function


As written, this function will only *add* workdays to the StartDate. If
the WorkDays value is less than 0, then "day zero" (12/30/1899) is
returned and can be used for error checking purposes.


--
Rick (MVP - Excel)


"sudheer" wrote in message
...
I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng
days .
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)


I need formula to execute that and how to implement it in shared
workbooks ?- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how do i know date after no. of working days

Well, maybe a little. However, if the OP doesn't want to use the Analysis
ToolPak for some reason, or if he is afraid that users he distributes the
worksheet to might not have it turned on, he can always place my function in
a Module and then use it as a User Defined Function (UDF) directly on the
worksheet.

--
Rick (MVP - Excel)


"Pete_UK" wrote in message
...
I thought that was a bit OTT, Rick !! <bg

Pete

On Oct 3, 5:12 pm, "Rick Rothstein"
wrote:
It just occurred to me that my solution (a VB coded solution) is probably
not what you were looking for. I had just posted some answers over in the
programming newsgroup and forgot that I was not still in that newsgroup
when
I posted my answer to you. I think Pete's answer is the one you are
looking
for.

--
Rick (MVP - Excel)

"Rick Rothstein" wrote in message

...



Give the following function a try...


Function AddWorkDays(StartDate As Date, WorkDays As Long) As Date
If WorkDays < 0 Then Exit Function
AddWorkDays = DateAdd("d", 7 * (WorkDays \ 5) + (WorkDays Mod 5) - _
2 * ((WorkDays Mod 5) Abs(5 + - _
Weekday(StartDate, vbMonday))) + _
Weekday(StartDate, vbSaturday) * _
(Weekday(StartDate, vbSaturday) < 3), StartDate)
End Function


As written, this function will only *add* workdays to the StartDate. If
the WorkDays value is less than 0, then "day zero" (12/30/1899) is
returned and can be used for error checking purposes.


--
Rick (MVP - Excel)


"sudheer" wrote in message
...
I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng
days .
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)


I need formula to execute that and how to implement it in shared
workbooks ?- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default how do i know date after no. of working days

and I've learned yet another piece of code. I could be a certified VB
programmer in about 3 months just by reading the posts!

"Rick Rothstein" wrote:

Well, maybe a little. However, if the OP doesn't want to use the Analysis
ToolPak for some reason, or if he is afraid that users he distributes the
worksheet to might not have it turned on, he can always place my function in
a Module and then use it as a User Defined Function (UDF) directly on the
worksheet.

--
Rick (MVP - Excel)


"Pete_UK" wrote in message
...
I thought that was a bit OTT, Rick !! <bg

Pete

On Oct 3, 5:12 pm, "Rick Rothstein"
wrote:
It just occurred to me that my solution (a VB coded solution) is probably
not what you were looking for. I had just posted some answers over in the
programming newsgroup and forgot that I was not still in that newsgroup
when
I posted my answer to you. I think Pete's answer is the one you are
looking
for.

--
Rick (MVP - Excel)

"Rick Rothstein" wrote in message

...



Give the following function a try...


Function AddWorkDays(StartDate As Date, WorkDays As Long) As Date
If WorkDays < 0 Then Exit Function
AddWorkDays = DateAdd("d", 7 * (WorkDays \ 5) + (WorkDays Mod 5) - _
2 * ((WorkDays Mod 5) Abs(5 + - _
Weekday(StartDate, vbMonday))) + _
Weekday(StartDate, vbSaturday) * _
(Weekday(StartDate, vbSaturday) < 3), StartDate)
End Function


As written, this function will only *add* workdays to the StartDate. If
the WorkDays value is less than 0, then "day zero" (12/30/1899) is
returned and can be used for error checking purposes.


--
Rick (MVP - Excel)


"sudheer" wrote in message
...
I want to know what is the date after no. of working days.
Suppose if we consider today's date i have to get date after 12 wrkng
days .
Today's date:3-oct-08
Date aftr 12 wrkng days :21-oct-08(Result)


I need formula to execute that and how to implement it in shared
workbooks ?- Hide quoted text -


- Show quoted text -



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
working out days between date. phil Excel Worksheet Functions 6 April 25th 07 02:57 PM
Can Excel add working days to a date to result in another date? cwalrus Excel Worksheet Functions 1 May 16th 06 07:27 PM
How do you add 40 working days to a date EmmaLaw22 Excel Discussion (Misc queries) 3 April 3rd 06 02:29 PM
Add on 8 working days to a date Shirley Munro Excel Worksheet Functions 2 March 9th 06 02:57 PM
date (minus) date = working days diff jjj Excel Discussion (Misc queries) 3 December 6th 05 03:16 PM


All times are GMT +1. The time now is 03:20 AM.

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

About Us

"It's about Microsoft Excel"