Note: DATEDIF automatically rounds down. To round up to the nearest month, see below.
The mystery of DATEDIF
The DATEDIF function is a "compatibility" function that comes from Lotus 1-2-3. For reasons unknown, DATEDIF is only documented in Excel 2000, and will not appear as a suggested function in the formula bar. However, you can use DATEDIF in all curren tExcel versions, you just need to enter the function manually. Excel will not help you with function arguments. See this page on the DATEDIF function for more information about available arguments.
DATEDIF takes 3 arguments: start_date, end_date, and unit. In this case, we want months, so we supply "m" for unit.
DATEDIF automatically calculates and returns a number for months, rounded down.
Nearest whole month
DATEDIF rounds down by default. If you want to calculate months to the nearest whole month, you can make a simple adjustment to the formula:
Dates in Excel are serial numbers that start on 1/1/1900, which is 1. In the example, the formula in cell D6 simply subtracts the numeric value of 1/1/1999 (36161) from the numeric value of 1/1/2000 (36526) to get a result of 365. The steps look...
The Excel NETWORKDAYS function calculates the number of working days between two dates. NETWORKDAYS automatically excludes weekends (Saturday and Sunday) and can optionally exclude a list of holidays supplied as dates. For example, in the screenshot...
The DATEDIF function is designed to calculate the difference between dates in years, months, and days. There are several variations available (e.g. time in months, time in months ignoring days and years, etc.) and these are set by the "unit"...
The Excel DATEDIF function returns the difference between two date values in years, months, or days. The DATEDIF (Date + Dif) function is a "compatibility" function that comes from Lotus 1-2-3. For reasons unknown, it is only documented in Excel...
Excel Formula Training
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.