The Excel YEAR function is used to extract the year from a date. It is a simple and handy function that can help you work with dates in your spreadsheets, such as calculating age, tracking milestones, or sorting data by year.
Syntax
YEAR(serial_number)
Arguments
serial_number | The date from which you want to extract the year. |
How to use
The YEAR function is quite straightforward to use. You provide it with a date, and it returns the year from that date. Here’s how you can use it:
Suppose you have a date in cell A1, and you want to extract the year from it. You can enter the following formula in a different cell:
1 |
=YEAR(A1) |
Examples
If cell A1 contains the date 01/15/2023, the formula =YEAR(A1)
would return 2023.
If cell A1 contains the date 05/10/2000, the formula =YEAR(A1)
would return 2000.
Keep in mind that the YEAR function only returns the year and not the full date. It’s a great tool for simplifying date-related calculations in your Excel spreadsheets.