Excel 2010 Bible

(National Geographic (Little) Kids) #1

Chapter 12: Working with Dates and Times


263


Calculating the number of work days between two dates ........................................

When calculating the difference between two dates, you may want to exclude weekends and holi-
days. For example, you may need to know how many business days fall in the month of November.
This calculation should exclude Saturdays, Sundays, and holidays. The NETWORKDAYS function
can help out.

Note
In versions prior to Excel 2007, the NETWORKDAYS function was available only when the Analysis ToolPak
add-in was installed. This function is now part of Excel and doesn’t require an add-in. n


The NETWORKDAYS function calculates the difference between two dates, excluding weekend days
(Saturdays and Sundays). As an option, you can specify a range of cells that contain the dates of
holidays, which are also excluded. Excel has no way of determining which days are holidays, so
you must provide this information in a range.

Figure 12.5 shows a worksheet that calculates the work days between two dates. The range A2:A11
contains a list of holiday dates. The two formulas in column C calculate the work days between the
dates in column A and column B. For example, the formula in cell C15 is

=NETWORKDAYS(A15,B15,A2:A11)

FIGURE 12.5

Using the NETWORKDAYS function to calculate the number of working days between two dates.

Free download pdf