Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Excel 2007/2010 function help

Posted on 2012-04-05
Medium Priority
410 Views
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
0
Question by:BajanPaul
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2

LVL 42

Accepted Solution

dlmille earned 2000 total points
ID: 37814949
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
0

LVL 42

Expert Comment

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

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

and copy down.

Dave
ExcelFunctionHelp-r2.xlsx
0

Author Closing Comment

ID: 37814995
Solution as described.  Thanks for your help.
0

Author Comment

ID: 37814996
Worked perfectly!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
###### Suggested Courses
Course of the Month10 days, 5 hours left to enroll