# calculates the number of years between two dates. : YEAR « Date Time functions « Microsoft Office Excel 2007 Tutorial

Home
Microsoft Office Excel 2007 Tutorial
 1 Introduction 2 Editing 3 Format Style 4 Table 5 Chart 6 Formula 7 Workbook Worksheet 8 Wordart Clip Art Shape Picture 9 PivotTable PivotChart 10 Data Analysis 11 Macro ActiveX Add in 12 Security 13 Collaboration 14 Database functions 15 Date Time functions 16 Engineering functions 17 Information functions 18 Logical functions 19 Lookup Reference functions 20 Math Trigonometry functions 21 Statistical functions 22 Text functions
 Microsoft Office Excel 2007 Tutorial » Date Time functions » YEAR
15.18.5.calculates the number of years between two dates.
 `Input the formula: =YEAR(A1)-YEAR(B1)`
 15.18.YEAR 15.18.1. YEAR() returns the year 15.18.2. =YEAR("7/5/10") 15.18.3. Return the day of the year for a date stored in cell A1: 15.18.4. Return the number of days remaining in the year from a particular date 15.18.5. calculates the number of years between two dates.