?
Solved

Excel 2007/2010 function help

Posted on 2012-04-05
4
Medium Priority
?
407 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

765 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