The Excel YEAR function extracts the year from a given date as number between 1900 to 9999. You can use the YEAR function to extract a year number from a date into a cell, or to feed a year number into another function like the MONTH function.
1. Learn about the Excel YEAR function
Where serial_number is any valid Excel date of the month.
The Excel YEAR function extracts the year from a given date as number between 1900 to 9999. For example, given the date “Jul 08, 2020”, the YEAR function will return 7 for July.
Dates can be supplied to the YEAR function as text (e.g. “10-Nov-2021”) or as native Excel dates, which are large serial numbers.
2. Examples of Excel YEAR function
=YEAR(“16-Jul-2019”) // returns 2019
=YEAR(“06-Aug-2020”) // returns 2020
With the date “November 23, 2021” in cell A2, YEAR returns 2021:
=YEAR(A1) // returns 2021
Note: dates are serial numbers in Excel, and begin on January 1, 1900. Dates before 1900 are not supported.
3. Common errors when using the YEAR function in Excel
YEAR will return #VALUE! if a date is not recognized. Please enter exactly what the function requires is day, month, year in numbers.
YEAR will return #NAME? if you entered the error value is a letter or a character. For example: YEAR(AA), YEAR([email protected])
YEAR will return #NUM! if a date is supplied as a number that is out of range (i.e. 1800).