How to Use the YEAR Function in Excel

Today, we will delve into the capabilities of a crucial function in Excel and Google Sheets – the YEAR function. This function is primarily used to extract the year from a specified date.

Overview

The YEAR function accepts a date input and returns the year component of that date as a four-digit integer.

Syntax

The syntax for the YEAR function is consistent between Excel and Google Sheets:

=YEAR(serial_number)
  • serial_number – The date from which the year is extracted.

Examples

Example 1: Basic Usage

Suppose cell A1 contains the date “1/15/2022”. To derive the year from this date using the YEAR function, the following formula would be implemented:

Date (A1) Year
1/15/2022 =YEAR(A1)
1/15/2022 2022

Example 2: Using the Function in a Calculation

The YEAR function can also be integrated into calculations. For example, it can be used to compare the year extracted from a date to the current year. In the following scenario, we assess whether the year in cell A2 matches the current year:

Date (A2) Is Current Year?
6/20/2021 =YEAR(A2)=YEAR(TODAY())
6/20/2021 FALSE

Conclusion

The YEAR function proves to be an invaluable asset for extracting and analyzing year data from dates in Excel and Google Sheets. Mastery of this function enables more effective date manipulations and diverse analytical possibilities based on year data.

More information: https://support.microsoft.com/en-us/office/year-function-c64f017a-1354-490d-981f-578e8ec8d3b9

Other functions
Returns the serial number of a particular date
Calculates the number of days, months, or years between two dates This function is useful in formulas where you need to calculate an age
Converts a date in the form of text to a serial number
Converts a serial number to a day of the month
Returns the number of days between two dates
Calculates the number of days between two dates based on a 360-day year
Returns the serial number of the date that is the indicated number of months before or after the start date
Returns the serial number of the last day of the month before or after a specified number of months
Converts a serial number to an hour
Returns the number of the ISO week number of the year for a given date
Converts a serial number to a minute
Converts a serial number to a month
Returns the number of whole workdays between two dates
Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days
Returns the serial number of the current date and time
Converts a serial number to a second
Returns the serial number of a particular time
Converts a time in the form of text to a serial number
Returns the serial number of today's date
Converts a serial number to a day of the week
Converts a serial number to a number representing where the week falls numerically with a year
Returns the serial number of the date before or after a specified number of workdays
Returns the serial number of the date before or after a specified number of workdays using parameters to indicate which and how many days are weekend days
Returns the year fraction representing the number of whole days between start_date and end_date