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.

158<br />

Part II: Using Functions in Your <strong>Formula</strong>s<br />

Excel 2010 includes an updated version of the NETWORKDAYS function, named<br />

NETWORKDAYS.INTL. This new version is useful if you consider weekend days to be<br />

days other than Saturday and Sunday.<br />

This workbook, work days.xlsx, is available on the companion CD-ROM.<br />

Offsetting a date using only work days<br />

The WORKDAY function is the opposite of the NETWORKDAYS function. For example, if you<br />

start a project on January 8 and the project requires ten working days to complete, the<br />

WORKDAY function can calculate the date that you will finish the project.<br />

The following formula uses the WORKDAY function to determine the date ten working days from<br />

January 8, 2010. A working day is a weekday (Monday through Friday).<br />

=WORKDAY(“1/8/2010”,10)<br />

The formula returns a date serial number, which must be formatted as a date. The result is<br />

January 22, 2010 (four weekend dates fall between January 8 and January 22).<br />

The preceding formula may return a different result, depending on your regional date<br />

setting. (The hard-coded date may be interpreted as August 1, 2010.) A better formula is<br />

=WORKDAY(DATE(2010,1,8),10)<br />

The second argument for the WORKDAY function can be negative. And, as with the<br />

NETWORKDAYS function, the WORKDAY function accepts an optional third argument (a reference<br />

to a range that contains a list of holiday dates).<br />

Calculating the number of years between two dates<br />

The following formula calculates the number of years between two dates. This formula assumes<br />

that cells A1 and B1 both contain dates:<br />

=YEAR(A1)-YEAR(B1)<br />

This formula uses the YEAR function to extract the year from each date and then subtracts one<br />

year from the other. If cell B1 contains a more recent date than the date in cell A1, then the result<br />

is negative.

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

Saved successfully!

Ooh no, something went wrong!