YEAR Function in Excel
For example, suppose we insert 19-Sep-87 in cell A1. Then, the YEAR function =YEAR(A1) will return 1987.
YEAR Formula in Excel
Parameters and Arguments:
date_value/serial_value – This is the value you have entered. It should be a valid date, which is then used to return the year value.
Return Value:
The return value in the YEAR formula will be a numeric value, which ranges between 1900 and 9999.
Usage Notes
T
The date value entered in the YEAR in Excel must be a valid Excel date in serial number format. For example, if you enter the date, Jan 1, 2000, it equals the serial number 32526.You should note that Excel can only handle dates after 1/1/1900, not before that.Suppose you put any invalid data in the YEAR formula in Excel. You will most probably get an error but no valid return value.You can use the TODAY function in ExcelTODAY Function In ExcelToday function is a date and time function that is used to find out the current system date and time in excel. This function does not take any arguments and auto-updates anytime the worksheet is reopened. This function just reflects the current system date, not the time.read more with YEAR to get the year from the current date as a return value.
How to Open the YEAR Function in Excel?
How to Use YEAR Function in Excel with Examples
Let us look below at some of the examples of the YEAR function. These examples will help you in exploring the use of the YEAR formula.
- First, you can enter the desired YEAR in the required cell to attain a return value on the argument. You can manually open the YEAR formula dialogue box in the spreadsheet and enter the required values. Consider the spreadsheet given below. You can see the YEAR option in Excel under the “DATE & TIME” function tab of the “Formulas” section. Click the YEAR option. The YEAR dialog box will open where you can enter the values to obtain a return value. See the screenshot below.
YEAR in Excel Worksheet
Based on the above Excel spreadsheet, let us consider the below examples and see the YEAR in Excel return based on the formula of the YEAR function.
Consider the screenshots of the above examples for a clear understanding.
Example #1
Example #2
Example #3
Example #4
Example #5
Example #6
As mentioned above, the YEAR in Excel can be combined with any other formula in Excel to obtain a return value, such as the DATE function. Example no. 6 shows the application of the YEAR and DATE Excel functionDATE Excel FunctionThe date function in excel is a date and time function representing the number provided as arguments in a date and time code. The result displayed is in date format, but the arguments are supplied as integers.read more together in an excel spreadsheet.
YEAR in Excel VBA
The YEAR formula can also be used as a VBA code in excelCode In ExcelIn Excel, the Code Function is used to determine the code of a character in a string. It only finds the code for the first character, thus if we use this formula as =Code(“Anand”) and =Code(“An”), the result will be 65, because the code for character A is 65.read more.
For example, look at the YEAR below in Excel to see the function’s use as VBA codeVBA CodeVBA code refers to a set of instructions written by the user in the Visual Basic Applications programming language on a Visual Basic Editor (VBE) to perform a specific task.read more.
In the above example, the variable LYear will now have the value of 2017.
Applications
We can use the Microsoft Excel YEAR function for various purposes and applications within the spreadsheet. Some of the common applications of YEAR formula spreadsheets are given below:
- Data validation date in a specific yearData Validation Date In A Specific YearThe data validation in excel helps control the kind of input entered by a user in the worksheet.read moreCount dates in a given yearConverting dates to Julian formatFinding out if a year is a leap yearMaking a series of dates by yearGetting the nth day of the yearAdding years to dateGetting percent of year completeGetting fiscal yearFiscal YearFiscal Year (FY) is referred to as a period lasting for twelve months and is used for budgeting, account keeping and all the other financial reporting for industries. Some of the most commonly used Fiscal Years by businesses all over the world are: 1st January to 31st December, 1st April to 31st March, 1st July to 30th June and 1st October to 30th Septemberread more from the date
YEAR Excel Function Common Problem
Sometimes you can face a common problem: the yield value of the YEAR function is not any numerical value, but it looks like a date such as “01/01/1900”. Most likely, this problem will arise when you have your cell format set as “Date.” To correct this problem, you have to set the cell format as “General.”
Things to Remember
- The YEAR formula allows you to return the year component of an entered date as a four-digit number.We can also use the YEAR formula for extracting and feeding a year value into any other Excel worksheet formula, such as the DATE function or TODAY function.Dates supplied in the YEAR in Excel should be supplied as serial numbers or references to cells with valid dates or valid date values.We should note that the value returned by the YEAR function will be Gregorian. Therefore, it will have no relation with the display format for the supplied date value in the YEAR formula in Excel.The YEAR function can understand dates in all possible formats perfectly.
YEAR Function in Excel Video
Recommended Articles
This article has been a guide to the YEAR Function in Excel. Here, we discuss the YEAR formula in Excel and how to use the YEAR formula, along with Excel examples and downloadable Excel templates. You may also look at these useful functions in Excel: –
- Excel WORKDAYExcel WORKDAYThe WORKDAY function returns the forthcoming work day after a given number of days from the start date. It has an optional argument for holidays that, if not provided, automatically considers weekends (Saturdays and Sundays) to be holidays.read moreWEEKDAY in ExcelWEEKDAY In ExcelThe WEEKDAY function in excel returns the day corresponding to a specified date. The date is supplied as an argument to this function. read moreDAY Function in ExcelDAY Function In ExcelIn Excel, the DAY function calculates the day value from a given date. This function accepts a date as an argument and returns a two-digit numeric value as an integer value representing the given date’s day. The formula to use this function is =Edate(serial number).read moreTIME Function in ExcelTIME Function In ExcelTime is a time worksheet function in Excel that is used to calculate time based on the inputs provided by the user. The arguments can take the following formats: hours, minutes, and seconds.read more