Solved

# Date Difference between 2 dates - Displaying total days minus Weekends

Posted on 2011-05-04
217 Views
I have a spreadsheet where I need to determine Actual days minus weekends - I tried using Networkdays without success.

=NETWORKDAYS(F2-G2)  I turned on the Analysis Pack tool addin still without luck

any ideas why this is not working - If I was doing it in Access I would use DateDif function.

Karen
0
Question by:Karen Schaefer

LVL 50

Expert Comment

The syntax should be like this

=NETWORKDAYS(F2,G2)

it includes both start and end date.....

regards, barry
0

LVL 10

Accepted Solution

hi,

I think Barry has got it sussed for you but here are some techniques you can use in the future to help you quickly learn the syntax of functions within excel...

- click in the formula bar somewhere between the brackets of a function & then click the [fx] button just to the left of the formula bar, this brings up a dialogbox which provides brief explanations as you click through each of the fields.

- make the [F1] key your friend, push it & search the Help files using the function name as a keyword in your search.

re networkdays, if you are also interested in other time/date related functions you may find Chip's pages useful: http://www.cpearson.com/excel/datetimews.htm
http://www.cpearson.com/excel/datetime.htm

hth
Rob
0

Author Closing Comment

thanks for the suggestion - I added two more columns to the spreadsheet to hold the Data conversion forumla then used those fields to calc the NetworkDays function.

K
0

LVL 10

Expert Comment

hi K,

Thanks for the points, but I don't deserve them. It was Barry who answered the question.

Rob
__________________
Rob Brockett. Always learning & the best way to learn is to experience...
0

Author Comment

I disagree, It was your links that gave me the answer, I already had the correct forumla, it was the conversion  of the DateSerial to date Date(F2), M... that gave me the solutions.  However, If you wish to share the points let me know and I will contact the administrator.

k
0

LVL 50

Expert Comment

Hello Karen, Rob

In fact the formula you showed in your question and in the screenshot wasn't correct - you have =NETWORKDAYS(F2-G2) when it should be =NETWORKDAYS(F2,G2).......but I guess that was just a typo. If you feel Rob supplied the information you needed to solve the issue then I have no problem with the points allocation as it stands.

regards, barry
0

LVL 10

Expert Comment

hi Karen & Barry,

Okay, if everyone else is happy then I'm happy too :-)

It was the typo & wording of the question that made me think the points should be for Barry. My links were only ever intended as a "hey, by the way, you can check this out for other useful tips & tricks", but I'm pleased they helped (sooner than I expected).

Barry, thanks for your generousity, it is one small step on the journey from "new kid on the block" to one of you guys with a ranking by my name - thankyou :-)

Rob
0

## Featured Post

### Suggested Solutions

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.