11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6: Working with Dates and Times 157<br />

Calculating the number of work days between two dates<br />

When calculating the difference between two dates, you may want to exclude weekends and holidays.<br />

For example, you may need to know how many business days fall in the month of<br />

November. This calculation should exclude Saturdays, Sundays, and holidays. Using the<br />

NETWORKDAYS function can help.<br />

The NETWORKDAYS function has a very misleading name. This function has nothing to<br />

do with networks or networking. Rather, it calculates the net number of workdays<br />

between two dates.<br />

The NETWORKDAYS function calculates the difference between two dates, excluding weekend<br />

days (Saturdays and Sundays). As an option, you can specify a range of cells that contain the<br />

dates of holidays, which are also excluded. Excel has absolutely no way of determining which<br />

days are holidays, so you must provide this information in a range.<br />

Figure 6-3 shows a worksheet that calculates the workdays between two dates. The range A2:A11<br />

contains a list of holiday dates. The formulas in column C calculate the workdays between the<br />

dates in column A and column B. For example, the formula in cell C15 is<br />

=NETWORKDAYS(A15,B15,A2:A11)<br />

Figure 6-3: Using the NETWORKDAYS function to calculate the number of working days between two<br />

dates.<br />

This formula returns 4, which means that the seven-day period beginning with January 1 contains<br />

four workdays. In other words, the calculation excludes one holiday, one Saturday, and one<br />

Sunday. The formula in cell C16 calculates the total number of workdays in the year.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!