#1   Report Post  
cribology - ExcelForums.com
 
Posts: n/a
Default Calculate only if...

Hi,

I currently have a spreadsheet that has this formula in the Q column.

=IF($D3=0,"",OR(NETWORKDAYS($D3,$F3)=1,+NETWORKDAY S($D3,$F3)=2))

It only calculates the networkdays if D3 is empty, but now I would
like it to calculate networkdays if both D3 and L3 is empty. How do I
adjust the formula to check the additional L3 cell?

  #2   Report Post  
cribology - ExcelForums.com
 
Posts: n/a
Default

My bad, it seems that

=IF($D3*$L3=0,"",OR(NETWORKDAYS($D3,$F3)=1,+NETWOR KDAYS($D3,$F3)=2))

works just fine.

  #3   Report Post  
mcpie
 
Posts: n/a
Default

try
=IF(AND($D3=0,$L3=0),"",OR(NETWORKDAYS($D3,$F3)=1, +NETWORKDAYS($D3,$F3)=2))

where the AND(... formula works in the same way as OR(...

"cribology - ExcelForums.com" wrote:

Hi,

I currently have a spreadsheet that has this formula in the Q column.

=IF($D3=0,"",OR(NETWORKDAYS($D3,$F3)=1,+NETWORKDAY S($D3,$F3)=2))

It only calculates the networkdays if D3 is empty, but now I would
like it to calculate networkdays if both D3 and L3 is empty. How do I
adjust the formula to check the additional L3 cell?


  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

As NETWORKDAYS($D3,$F3)=1 will only be true if D3 and F3 are the same date,
why not use $D3=$F3

--
HTH

Bob Phillips

"mcpie" wrote in message
...
try

=IF(AND($D3=0,$L3=0),"",OR(NETWORKDAYS($D3,$F3)=1, +NETWORKDAYS($D3,$F3)=2))

where the AND(... formula works in the same way as OR(...

"cribology - ExcelForums.com" wrote:

Hi,

I currently have a spreadsheet that has this formula in the Q column.

=IF($D3=0,"",OR(NETWORKDAYS($D3,$F3)=1,+NETWORKDAY S($D3,$F3)=2))

It only calculates the networkdays if D3 is empty, but now I would
like it to calculate networkdays if both D3 and L3 is empty. How do I
adjust the formula to check the additional L3 cell?




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
help with sumif to calculate column rvnwdr Excel Discussion (Misc queries) 3 June 30th 05 12:38 AM
How can I calculate Vacation Time earned based on length of emplo. Kim Excel Discussion (Misc queries) 2 March 15th 05 08:04 PM
formula to calculate # of days between dates, excluding holidays abs2299 Excel Discussion (Misc queries) 8 March 3rd 05 02:21 AM
Not able to calculate. mark_kramarczyk Excel Worksheet Functions 1 December 29th 04 08:55 PM
How do you calculate the nth root of a number in Excel 2003? William Excel Worksheet Functions 2 November 17th 04 04:19 PM


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

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

About Us

"It's about Microsoft Excel"