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
4
Medium Priority
?
410 Views
Last Modified: 2012-04-05
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
Comment
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
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
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

by:dlmille
ID: 37814952
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
0
 

Author Closing Comment

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

Author Comment

by:BajanPaul
ID: 37814996
Worked perfectly!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question