We have a dataset that includes player names and their dates of birth. We want to extract the year from the dates.
Method 1 – Inserting the YEAR Function to Extract the Year from a Date in Excel
Steps
- Select cell D5, where you want to put the extracted year values.
- Insert the following formula in the formula box:
=YEAR(C5)
We put cell C5 because we want to extract the year from this particular cell.
- Press Enter. It’ll automatically show the year value.
- Drag the Fill Handle icon to the last cell where you want to put the extracted year. We get all the extracted year values.
Read More: How to Extract Month from Date in Excel
Method 2 – Using the TEXT Function to Extract Year
Steps
- Insert the following formula in cell D5.
=TEXT(C5,”yyyy”)
C5 denotes the cell value and yyyy denotes the format text. Excel recognizes this as the format for years.
- Press Enter and you’ll get the required year value.
- Drag the Fill Handle icon to the last cell where you want to extract the year value for the respective cells.
Read More: How to Extract Month and Day from Date in Excel
Method 3 – Using Excel Format Cells to Extract the Year from the Date
Excel has 4 different ways to open Format Cells.
Keyboard Shortcut:
Press Ctrl + 1, and the Format cells box will pop up.
Format Cells Option:
Select the text from which you want to extract years, right-click on the selected text cell, and select Format cells.
From Home Tab:
In the Home tab, there is a Cells section where you can choose the Format option.
From the Number section:
Select Format from the Number group in the Home tab.
Steps
- Select the data from which you want to extract the year and copy it to another column. We copied the range of cells C5:C10 and pasted it into the range of cells D5:D10.
- Open Format Cells. We did it through the Number section from the Home. In the Number section, there is a small arrow at the bottom. Click on it and the Format Cells window will pop up.
- In the Format Cells window, select the Number tab.
- In the Category section, select Custom and change the type to yyyy.
- Click on OK.
- This will modify all the selected cells and provide the year only.
Read More: How to Extract Data from Cell in Excel
Download the Practice Workbook
Related Articles
- Excel Formula to Get First 3 Characters from a Cell
- How to Extract Data Based on Criteria from Excel
- How to Extract Data From Table Based on Multiple Criteria in Excel
- How to Extract Specific Data from a Cell in Excel
- How to Extract Data from Excel Based on Criteria
- How to Extract Data from a List Using Excel Formula
- How to Extract Data from Excel Sheet
<< Go Back To Extract Data Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!