# Excel YEAR Function

## Function Description

The Excel Year function returns an integer representing the year of a supplied date.

The syntax of the function is:

YEAR( serial_number )

where the serial_number argument is the date that you want to return the year of.

Note that it is recommended that dates should be supplied to Excel functions as either:

• Serial numbers;
or
• Reference to cells containing dates;
or
• Date values returned from other Excel formulas.
If you attempt to input dates as text, there is a risk that Excel may misinterpret them, due to different date systems, or date interpretation settings on your computer.

## Year Function Examples

Column B of the following spreadsheet shows the Excel Year function, used to extract the year from three different dates.

Formulas:
AB
1DateYear
229-May-2015=YEAR( A2 )
305/03/1984=YEAR( A3 )
4 =YEAR( DATE(2016, 1, 1) )
Results:
AB
1DateYear
229-May-20152015
305/03/19841984
4 2016

Note that, in the above examples:

• As recommended, the dates are supplied as references to cells containing dates or (in the example in cell B3), as a date returned from another Excel function.
• The example in cell B3 uses the Excel Date function to supply the date 01/01/2016 to the Year function.

For further information and examples of the Excel Year function, see the Microsoft Office website.

## Year Function Common Problem

Common Problem:

The result of your Year function looks like a date (e.g. "01/01/1900"), instead of returning an integer.

Solution:

This problem is most likely to be because the new cell or column is formatted as a 'date'. In this case, it is only the formatting of the cell that is wrong, NOT the value returned by the function.

The easiest way to correct this is to select the General formatting option from the drop-down format menu of the Excel ribbon. This is generally located in the 'Number' group, on the Home tab of the ribbon (see below):

See the Excel Formatting page for more information on formatting in Excel.