Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Networkdays and misleading results from blank column

Hello, I am working with two columns of dates and need to work out the number
of working days between two dates, column A and column B with result in
Column C. However in some instances column B is blank.
Example: Column A = 14/01/2010 Column B = 23/01/2010 Result = 7 & thats
ok. Problem is when column B is blank because the result would then come
back as -28708.

I am using the following formula: =NETWORKDAYS(A1,B1,Holidays). How could
I add a condition to this formula that would translate 'if A1 and B1 are not
blank then calculate number of days, if B1 is blank return a 0 (zero) result'

Reason I need a zero or blank return is because afterward I'm working out
the average number of days.
Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Networkdays and misleading results from blank column

On Mon, 29 Mar 2010 11:23:01 -0700, Rosemarie
wrote:

Hello, I am working with two columns of dates and need to work out the number
of working days between two dates, column A and column B with result in
Column C. However in some instances column B is blank.
Example: Column A = 14/01/2010 Column B = 23/01/2010 Result = 7 & thats
ok. Problem is when column B is blank because the result would then come
back as -28708.

I am using the following formula: =NETWORKDAYS(A1,B1,Holidays). How could
I add a condition to this formula that would translate 'if A1 and B1 are not
blank then calculate number of days, if B1 is blank return a 0 (zero) result'

Reason I need a zero or blank return is because afterward I'm working out
the average number of days.
Many thanks


Something like (not tested):

=if(count(a1:b1)=2, NETWORKDAYS(A1,B1,Holidays),0))

or maybe

=max(0,NETWORKDAYS(A1,B1,Holidays)))
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Networkdays and misleading results from blank column

=IF(B1="","",NETWORKDAYS(A1,B1,Holidays)


Gord Dibben MS Excel MVP

On Mon, 29 Mar 2010 11:23:01 -0700, Rosemarie
wrote:

Hello, I am working with two columns of dates and need to work out the number
of working days between two dates, column A and column B with result in
Column C. However in some instances column B is blank.
Example: Column A = 14/01/2010 Column B = 23/01/2010 Result = 7 & thats
ok. Problem is when column B is blank because the result would then come
back as -28708.

I am using the following formula: =NETWORKDAYS(A1,B1,Holidays). How could
I add a condition to this formula that would translate 'if A1 and B1 are not
blank then calculate number of days, if B1 is blank return a 0 (zero) result'

Reason I need a zero or blank return is because afterward I'm working out
the average number of days.
Many thanks


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Networkdays and misleading results from blank column

if B1 is blank return a 0 (zero) result'
Reason I need a zero or blank return is because
afterward I'm working out the average number of days.


If you return 0 when there aren't 2 dates in the cells then that might skew
your average.

How about returning a blank?

=IF(COUNT(A1,B1)<2,"",NETWORKDAYS(A1,B1,Holidays))

--
Biff
Microsoft Excel MVP


"Rosemarie" wrote in message
...
Hello, I am working with two columns of dates and need to work out the
number
of working days between two dates, column A and column B with result in
Column C. However in some instances column B is blank.
Example: Column A = 14/01/2010 Column B = 23/01/2010 Result = 7 & thats
ok. Problem is when column B is blank because the result would then come
back as -28708.

I am using the following formula: =NETWORKDAYS(A1,B1,Holidays). How
could
I add a condition to this formula that would translate 'if A1 and B1 are
not
blank then calculate number of days, if B1 is blank return a 0 (zero)
result'

Reason I need a zero or blank return is because afterward I'm working out
the average number of days.
Many thanks



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
Different results: Networkdays versus date subtraction OxonLad Excel Worksheet Functions 6 June 18th 08 03:38 PM
SUMIF - Sum_Range is misleading Epinn Excel Worksheet Functions 3 October 29th 06 08:53 AM
NETWORKDAYS calculation returns inconsistent results Analowl Excel Worksheet Functions 1 August 30th 06 02:28 AM
Grouping the results of Networkdays fourskunks Excel Discussion (Misc queries) 2 December 5th 05 03:35 PM
networkdays() problem when deleting row or column Jason Excel Worksheet Functions 0 April 8th 05 11:09 PM


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