Excel YEAR function =YEAR(A2) - returns the year of a date in cell A2. =YEAR("20-May-2015") - returns the year of the specified date.
How do I enter a year in Excel?
We can just open the Format Cells dialog by pressing Ctrl + 1. After that select the Custom category on the Number tab, and enter one of the codes below in the Type box: yy – to display 2-digit years, as 00-99. yyyy – to display 4-digit years, as 1900-9999.
Can you set year in Excel?
You can also use the DATE function in Excel to change the year for a date. The DATE function takes three arguments: year, month, and day. For example, if you want to change the year for a date from 2015 to 2016, you would use the following formula: =DATE(2016,1,1). This would change the year for that date to 2016.