Signup/Sign In
PUBLISHED ON: AUGUST 9, 2022

How to Use the YEAR Function in Microsoft Excel

Introduction

The YEAR function in Microsoft Excel may be used to rapidly extract the year from a date. This will place the year value in a different cell for you so that you may use it in a different calculation.

How to Use Excel's YEAR Function

Step 1: Select the cell where you want your YEAR to appear by clicking on it.

Step 2: Enter the YEAR Function Formula, which is =YEAR(serial number), and substitute any cell from the date column for the serial number to display the year you wish to view.

Step 3: Simply press the Enter key at this point to get the YEAR number.


Note 1: In the YEAR formula, you cannot substitute a date for the serial number.

YEAR funtion

The following #NAME? error will appear if you write in this way.

The YEAR Function formula includes a serial number because each date in the date column has a unique number assigned to it.

Note 2: As you can see, the years listed in the last two cells are, respectively, before 1900 and after 9999. Therefore, if you use this YEAR function, you will get a #VALUE! error.

Function of YEAR

You can see how simple it is to utilise Excel's YEAR function from the above. Excel's YEAR function may also be utilised as a VBA-Visual Basic for Applications function in addition to being a worksheet function. This function will insert the year number into the appropriate cell from the date. Let's use the example provided below to assist us comprehend this function.



About the author:
Adarsh Kumar Singh is a technology writer with a passion for coding and programming. With years of experience in the technical field, he has established a reputation as a knowledgeable and insightful writer on a range of technical topics.