Learning how to extract the year from a date in Excel is a valuable skill for data manipulation and analysis. This step-by-step guide will show you various methods to achieve this task efficiently.
Method 1: Using the YEAR Function

The YEAR function is a straightforward way to extract the year from a date. Here's how you can use it:
- Select the cell where you want the extracted year to appear.
- Enter the formula
=YEAR(date)
, replacingdate
with the cell reference or the date you want to extract the year from. - Press Enter, and Excel will display the year.
For example, if you have the date 1/1/2023
in cell A1, the formula =YEAR(A1)
will return 2023
.
Method 2: Formatting Cells

You can also format the cell to display only the year. This method is useful when you want to keep the original date but display it differently.
- Select the cell or range of cells containing the dates.
- Right-click and choose Format Cells or use the keyboard shortcut
Ctrl + 1
to open the Format Cells dialog. - In the Number tab, select Custom from the Category list.
- In the Type box, enter
yyyy
(four-digit year format) oryy
(two-digit year format) and click OK.
Now, the selected cells will display only the year portion of the date.
Method 3: Using Text Functions

Excel's text functions can also help you extract the year. Here's how you can use the LEFT
and RIGHT
functions:
- Select the cell where you want the extracted year to appear.
- Enter the formula
=LEFT(date, 4)
, replacingdate
with the cell reference or the date you want to extract the year from. - This formula assumes the date is in the
mm/dd/yyyy
format. If your date format is different, adjust the formula accordingly. - For example, if you have the date
1/1/2023
in cell A1, the formula=LEFT(A1, 4)
will return2023
.
You can also use the RIGHT
function for date formats where the year is at the end, such as dd/mm/yyyy
.
Method 4: Combining Text and Date Functions

If your date is stored as text and not as a date format, you can use a combination of text and date functions to extract the year.
- Select the cell where you want the extracted year to appear.
- Enter the formula
=YEAR(DATEVALUE(text_date))
, replacingtext_date
with the cell reference containing the date stored as text. - For example, if you have the date
1/1/2023
stored as text in cell A1, the formula=YEAR(DATEVALUE(A1))
will return2023
.
Additional Tips and Notes

💡 Note: Always ensure your date is in a recognized format, such as mm/dd/yyyy
or dd/mm/yyyy
, to avoid errors.
💡 Note: When using the YEAR function, Excel automatically recognizes and extracts the year from valid date formats.
💡 Note: If your date is stored as text, you may need to convert it to a date format using the DATEVALUE
function before extracting the year.
By following these methods, you can efficiently extract the year from dates in Excel, making your data analysis and reporting more streamlined and accurate.
FAQ

Can I extract the year from a date in a different language format?

+
Yes, Excel supports various date formats, including those in different languages. You can adjust the formula or cell formatting to match your date format.
What if my date has a time component? Will it affect the extracted year?

+
No, the YEAR function and other methods mentioned above will ignore the time component and extract only the year from the date.
Can I extract multiple years from a range of dates in one step?

+
Yes, you can use the YEAR function with a range of cells containing dates. Excel will apply the function to each cell in the range and return an array of extracted years.