You are on page 1of 7

Find the difference in years: Start date End date Result

1/14/2014 4/6/2016 2

Find the difference in months: Start date End date Result


1/1/2014 5/6/2016 28

Find the difference in days: Start date End date Result


1/1/2014 5/6/2016 856

Find the difference in weeks: Start date End date Result


1/1/2014 5/6/2016 122.29

Calculate age in accumulated


years, months and days: Start date End date Result
1/1/2014 5/6/2016 2
4
5
All in one: 2 years, 4 months, 5 days

Tip: Press ALT+ENTER to put line breaks in your formula.


Also, press CTRL+SHIFT+U if you can’t see the whole formula.

Calculate the difference between


today and another date: End date Result
12/31/3000 981

Calculate workdays, with


or without holidays: First, make a list of all holidays in a separate area.
Make sure each date is in its own cell.

Holidays
1/1/2016 9/5/2016
1/18/2016 10/10/2016
2/15/2016 11/11/2016
5/30/2016 11/24/2016
7/4/2016 12/25/2016

After you put each holiday in its own cell,


select those cells. Then go to Formulas > Define Name.
Name the range, and click OK.

Note: We have done this already in this workbook.


We named the range, "MyHolidays." You can see
the name by going to Formulas > Name Manager.

In this example, the NETWORKDAYS.INTL


function calculates the number of workdays:
Start date End date Result
1/1/2016 12/31/2016 252

In Excel 2007, you can use the NETWORKDAYS


function to calculate the number of workdays:
Start date End date Result
1/1/2016 12/31/2016 252

If you want your holidays inside a formula,


you can use extra brackets, quotes, and commas.

This highlighted cell shows an example


of 2 holiday dates within the formula:
Start date End date Result
1/1/2016 12/31/2016 260

And here's an Excel 2007 example of


of 2 holiday dates within the formula:
Start date End date Result
1/1/2016 12/31/2016 260

Calculate the difference


between two times: Start time End time Difference
7:15 AM 4:30 PM 9:15

Calculate the difference


between two times: Start date/time End date/time Difference
1/1/16 1:00 PM 1/2/16 2:00 PM 25:00
This document is provided “as is.” Information and views expressed in this document, including URLs and
other Internet Web site references, may change without notice.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or
connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft
product. You may copy and use this document for your internal, reference purposes.

This document may be available in English only. Clicking embedded links may redirect you to a website
whose content is in English.

Microsoft, Excel, Internet Explorer, and Windows are trademarks of Microsoft Corporation. All other
trademarks are property of their respective owners.
Make sure to format this particular result as a number.
Press CTRL + 1, and then select Number > Decimal places: 2

Unit of time
years
months
days

Use ampersands, quotes, spaces and text to put all three age
calculations in one cell. It's a longer formula to type, but at least
all three results are combined into one cell.

Putting TODAY() in the formula allows you to find the difference


between the current day of your computer, with the end date of
12/31/3000. The date of TODAY() will change if you open the
file on a future day.
The "1" parameter tells NETWORKDAYS.INTL to exclude
weekend days of Saturdays and Sundays. But you can use "2"
for Sunday and Monday, "3" for Monday and Tuesday, and so
on. To see all possible parameters, delete the "1" from this
formula and pick from the list.
In Excel 2007, this cell will return the #NAME? error.

In Excel 2007, you must use the NETWORKDAYS function. This


function doesn't have weekend parameters. It always assumes
that your weekends are on Saturdays and Sundays.
luding URLs and

al association or

ny Microsoft

u to a website

n. All other

You might also like