Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 18
Default days calculation

Hi All
The following formula is calculating the no of days without holidays, so I
want this formula in excel function way.
=SUMPRODUCT(INT((D5-C5+WEEKDAY(C5-{1,2,3,4,5}))/7))

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,393
Default days calculation

Have a look in Help at NETWORKDAYS
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Yousoft" wrote in message
...
Hi All
The following formula is calculating the no of days without holidays, so I
want this formula in excel function way.
=SUMPRODUCT(INT((D5-C5+WEEKDAY(C5-{1,2,3,4,5}))/7))



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 18
Default days calculation


I mean that I want this formula in UDF form.
"Bernard Liengme" wrote:

Have a look in Help at NETWORKDAYS
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Yousoft" wrote in message
...
Hi All
The following formula is calculating the no of days without holidays, so I
want this formula in excel function way.
=SUMPRODUCT(INT((D5-C5+WEEKDAY(C5-{1,2,3,4,5}))/7))




  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,393
Default days calculation

Here is the code
Function workdays(firstday, lastday, holidays)
workdays = WorksheetFunction.NetworkDays(firstday, lastday, holidays)
End Function

called with =workdays(a1,b1,d1:5) where A1 has the first day, B1 the last
day and D1:D5 a list of holiday dates

Not bothered by holidays?
Function workdays(firstday, lastday)
workdays = WorksheetFunction.NetworkDays(firstday, lastday)
End Function
called with =workdays(a1,b1,d1:5) where A1 has the first day, B1 the last
day

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Yousoft" wrote in message
...

I mean that I want this formula in UDF form.
"Bernard Liengme" wrote:

Have a look in Help at NETWORKDAYS
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Yousoft" wrote in message
...
Hi All
The following formula is calculating the no of days without holidays,
so I
want this formula in excel function way.
=SUMPRODUCT(INT((D5-C5+WEEKDAY(C5-{1,2,3,4,5}))/7))






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
Calculation of working days between two dates Andy B Excel Worksheet Functions 1 August 1st 07 01:43 PM
How to calculation no. of days (only working days) between two dat Vivian Chan Excel Discussion (Misc queries) 1 July 26th 07 09:16 AM
Please Help With Days Elapsed And Days Remaining Calculation Scoooter Excel Worksheet Functions 2 June 14th 06 05:10 PM
Days calculation between months psbhat Excel Worksheet Functions 1 January 17th 06 11:04 AM
cALCULATION OF DAYS WINONA Excel Worksheet Functions 3 February 16th 05 04:23 PM


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