Solved

Excel 2007/2010 function help

Posted on 2012-04-05
4
405 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 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

690 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