[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
Solved

# Excel difference between two dates in working (5 day weeks)

Posted on 2010-08-31
Medium Priority
381 Views
Hi all,

im trying to get the difference between two dates in working weeks (5 day weeks)

eg
A1
28/10/2011

A2
18/08/2011

=(A1-A2)/7 give us 10.14 which is wrong for what we need, we need it to be a 5 day week not 7 so should give us 10.2

this doable?
Thanks
0
Question by:awilderbeast
• 3
• 2
• 2

LVL 50

Expert Comment

ID: 33565712
Hello awilderbeast,

you can use Networkdays() to use only weekdays and exclude weekdays and holidays. In Excel 2003 and earlier, you need to activate the Analysis Toolpak

With your data, the formula would be

=NETWORKDAYS(A6,A3)/5

You want to divide by 5, since that is the number of workdays in the week. The result is 10.4, though, not 10.2

cheers, teylyn
0

LVL 50

Accepted Solution

Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 33565726
correct the cell references in the above formula to

=NETWORKDAYS(A2,A1)/5

The syntax for Networkdays() is

=Networkdays(startDate,endDate,[holidays - optional])
0

LVL 1

Author Comment

ID: 33565727
it comes out as -10.4 on mine, why -?
0

LVL 9

Expert Comment

ID: 33565732
try to use networkdays function if you are using Excel 2007.
0

LVL 9

Expert Comment

ID: 33565744
format the cell as number with decimal place Zero.
0

LVL 1

Author Closing Comment

ID: 33565756
thats great thanks
0

LVL 50

Expert Comment

ID: 33565802
>> it comes out as -10.4 on mine, why -?

NZ variance maybe. Things are different Down under. :-)

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.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
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…
###### Suggested Courses
Course of the Month18 days, 5 hours left to enroll