Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Handyy
 
Posts: n/a
Default Workday function including sat, excluding sun


Hi,

I'm trying to create a function which would calculate estimated
kilometers driven. Our trucks will stop only for sundays so there comes
my WORKDAY-function problem.

If I have example dates:
1.1.2006 - 31.1.2006 = 26 truck workdays

How can I get that result with workdays function, saturdays included
but bank holidays excluded?

Thanks in advance :)


--
Handyy
------------------------------------------------------------------------
Handyy's Profile: http://www.excelforum.com/member.php...o&userid=30958
View this thread: http://www.excelforum.com/showthread...hreadid=515264

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Workday function including sat, excluding sun


If you're trying to calculate the number of workdays between 2 dates the
function you need is NETWORKDAYS not WORKDAY. To count weekdays and
Saturdays

=NETWORKDAYS(A1,B1,holidays)+INT((WEEKDAY(A1)+B1-A1)/7)

where A1 contains start date and B1 end date and holidays is a named
range containing (weekday) holiday dates


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=515264

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Workday function including sat, excluding sun

might want to cater for Saturday holidays

=NETWORKDAYS(A1,B1,holidays)+INT((WEEKDAY(A1)+B1-A1)/7)-
SUMPRODUCT(--(WEEKDAY(A1:A20))=7,--ISNUMBER(MATCH(A1:A20,holidays,0)))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"daddylonglegs"
wrote in message
news:daddylonglegs.23mq5m_1140609302.5881@excelfor um-nospam.com...

If you're trying to calculate the number of workdays between 2 dates the
function you need is NETWORKDAYS not WORKDAY. To count weekdays and
Saturdays

=NETWORKDAYS(A1,B1,holidays)+INT((WEEKDAY(A1)+B1-A1)/7)

where A1 contains start date and B1 end date and holidays is a named
range containing (weekday) holiday dates


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:

http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=515264



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Handyy
 
Posts: n/a
Default Workday function including sat, excluding sun


Thanks for the tips, really helpful info for me!


--
Handyy
------------------------------------------------------------------------
Handyy's Profile: http://www.excelforum.com/member.php...o&userid=30958
View this thread: http://www.excelforum.com/showthread...hreadid=515264

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
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
to use workday function in excel vba code sjayar Excel Discussion (Misc queries) 1 November 10th 05 12:48 PM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
How do I get the WORKDAY function? jorfo Excel Discussion (Misc queries) 1 December 4th 04 11:01 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 02:08 PM.

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"