Results 1 to 2 of 2
2004-03-04, 03:29 #1
- Join Date
- Jan 2001
- Wellington, Wellington, New Zealand
- Thanked 0 Times in 0 Posts
Calculate weekdays between two dates (Excel97)
I want to calculate the number of weekdays between two dates in Excel. Is there a built-in way of doing this, or do I have to write my own code?
2004-03-04, 07:10 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Calculate weekdays between two dates (Excel97)
If you just want the number of days between the dates, subtract one from the other. For example, if A1 contains 4-Mar-2004 and A2 contains 22-Feb-2004, the formula =A1-A2 will return 11 (after clearing the format - Excel has an annoying habit of formatting the difference between dates as a date too.)
If you want the number of working days between two dates, use the NETWORKDAYS function from the Analysis Toolpak add-in that comes with Excel. In the above example, =NETWORKDAYS(A2,A1) will return 9.
- NETWORKDAYS includes both the start date and end date in the count. If you don't want to count both, subtract one from the result.
- NETWORKDAYS has an optional third argument to specify holidays; see the online help.