#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 358
Default Workdays


I am using the following formula to calculate workdays
=SUMPRODUCT(INT((MAX(K9,J9)-WEEKDAY(MAX(K9,J9)+1-{2;3;4;5;6})-MIN(K9,J9)+8)/7))

However I am experiencing the following problems:

When no dates are captured in start or end date it calculates an #NUM! error

I have more than one interval where the end date in the one formula becomes
the start date of the next formula. If i capture the end date in the one
calculation but no end date in the next calculation a 1 day total is
calculated while it should be 0 until a end date is completed
--
Andrew
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Workdays

=IF(OR(J9="",K9=""),0,SUMPRODUCT(INT((MAX(K9,J9)-WEEKDAY(MAX(K9,J9)+1-{2;3;4;5;6})-MIN(K9,J9)+8)/7)))

--
__________________________________
HTH

Bob

"Andrew" wrote in message
...

I am using the following formula to calculate workdays
=SUMPRODUCT(INT((MAX(K9,J9)-WEEKDAY(MAX(K9,J9)+1-{2;3;4;5;6})-MIN(K9,J9)+8)/7))

However I am experiencing the following problems:

When no dates are captured in start or end date it calculates an #NUM!
error

I have more than one interval where the end date in the one formula
becomes
the start date of the next formula. If i capture the end date in the one
calculation but no end date in the next calculation a 1 day total is
calculated while it should be 0 until a end date is completed
--
Andrew



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 358
Default Workdays

Thank You Bob
--
Andrew


"Bob Phillips" wrote:

=IF(OR(J9="",K9=""),0,SUMPRODUCT(INT((MAX(K9,J9)-WEEKDAY(MAX(K9,J9)+1-{2;3;4;5;6})-MIN(K9,J9)+8)/7)))

--
__________________________________
HTH

Bob

"Andrew" wrote in message
...

I am using the following formula to calculate workdays
=SUMPRODUCT(INT((MAX(K9,J9)-WEEKDAY(MAX(K9,J9)+1-{2;3;4;5;6})-MIN(K9,J9)+8)/7))

However I am experiencing the following problems:

When no dates are captured in start or end date it calculates an #NUM!
error

I have more than one interval where the end date in the one formula
becomes
the start date of the next formula. If i capture the end date in the one
calculation but no end date in the next calculation a 1 day total is
calculated while it should be 0 until a end date is completed
--
Andrew




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default Workdays

Hi Andrew,

Why not use the NETWORKDAYS function which calculates the number of workdays
between two dates excluding weekends and if you so choose holidays?

This function is part of the Analysis ToolPak - attach it by choosing Tools,
Add-Ins, Analysis ToolPak.

Cheers,
Shane Devenshire
Microsoft Excel MVP

"Andrew" wrote in message
...

I am using the following formula to calculate workdays
=SUMPRODUCT(INT((MAX(K9,J9)-WEEKDAY(MAX(K9,J9)+1-{2;3;4;5;6})-MIN(K9,J9)+8)/7))

However I am experiencing the following problems:

When no dates are captured in start or end date it calculates an #NUM!
error

I have more than one interval where the end date in the one formula
becomes
the start date of the next formula. If i capture the end date in the one
calculation but no end date in the next calculation a 1 day total is
calculated while it should be 0 until a end date is completed
--
Andrew


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
determine workdays Joe H. Excel Worksheet Functions 1 March 6th 08 05:21 PM
Adding workdays Excel-learner Excel Worksheet Functions 1 January 30th 08 03:42 PM
Workdays Formula Shannon Excel Worksheet Functions 1 October 13th 06 08:46 PM
Workdays Function KeyMike Excel Worksheet Functions 1 August 9th 06 02:42 PM
Workdays Alpur Excel Discussion (Misc queries) 3 November 3rd 05 04:00 PM


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