Solved

Date Difference/Subtracting With Weekends (Network Days)

Posted on 2008-10-29
2
1,030 Views
Last Modified: 2009-01-11
Hi,

On Excel I want to subtract a date from another date to give me number I.E. 29/10/2008 (D1) - 24/10/2008 (C1) = 5, but I want it to take into consideration weekends.

So as the 25th and 26th were a weekend then the answer should be 3.

Also the dates may only go over 1 weekend day and not both I.E. 26/10/2008 - 24/10/2008 should equal 1 with this formulae.

Thanks for the help

Steve
0
Comment
Question by:Sk1lly
[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 Comments
 
LVL 20

Expert Comment

by:Ardhendu Sarangi
ID: 22832931
Hi,
Won't the NETWORKDAYS give you what you need?
Syntax:  NETWORKDAYS(start_date,end_date,holidays)
If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 125 total points
ID: 22835661
NETWORKDAYS counts all weekdays in the range including the start date and the end date so the formula
=NETWORKDAYS(C1,D1)
will give a result of 4 for your example. Some people just subtract 1 from the result to get the desired result but this doesn't necessarily work in all cases, e.g. if your start or end dates are non-weekdays
Here's an alternative to NETWORKDAYS if you don't want to use Analysis ToolPak functions
=SUM(INT((WEEKDAY(C1-{2,3,4,5,6})+D1-C1)/7))
.....but it'll still give a result of 4!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

726 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