Excel 2007/2010 function help

BajanPaul
BajanPaul used Ask the Experts™
on
To all excel gurus,
I need help with the current excel function:
=NETWORKDAYS($G4,$H4)+IF(NETWORKDAYS($G4,$H4)+ NETWORKDAYS($G4,$H4)=2,-SIGN(NETWORKDAYS($G4,$H4)),0)

This function works great to calculate the number of days between two dates.  How do I make it calculate 1 day if the date range is the same?
I have another simple calculation based upon the result.  

Please see the attached excel worksheet.

Any help will be greatly appreciated.
ExcelFunctionHelp.xlsx
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2012
Commented:
Use:

[B2]=IF($D2=$E2,1,NETWORKDAYS($D2,$E2)+IF(NETWORKDAYS($D2,$E2)+ NETWORKDAYS($D2,$E2)=2,-SIGN(NETWORKDAYS($D2,$E2)),0))

and copy down.

See attached.

Dave
ExcelFunctionHelp--1-.xlsx
Most Valuable Expert 2012
Top Expert 2012

Commented:
However, what I don't understand is why you aren't just using:

[B2]=NETWORKDAYS($D2,$E2)

and copy down.

Please advise.

Dave
ExcelFunctionHelp-r2.xlsx

Author

Commented:
Solution as described.  Thanks for your help.

Author

Commented:
Worked perfectly!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial