The YEAR Function in Excel is used to get the year value from the given input date!

YEAR Function: A Brief

The YEAR function in Excel is a simple yet powerful tool used to extract the year from a given input date. This function is extremely useful when you are working with dates and need to separate or analyze the year part individually.

Objective

Value Returned by function

Aim to returns the year value

YEAR function in excel will return year value in 4 digits from the given input date.

The YEAR function was introduced in Excel version 1.0, which was released in 1985 for Macintosh and 1987 for Windows.

YEAR Function: Basic Syntax

=YEAR(serial_number) // Serial_number or Excel Date Value

The list of supported input formats that Excels YEAR function can handle as serial numbers:

  1. Date entered directly, =YEAR("12/31/2023")
  2. Cell reference containing a date, =YEAR(A1), where A1 = 01-Jan-2020
  3. Excel serial number, =YEAR(44561) → returns 2022
  4. DATE function, =YEAR(DATE(2022,5,10))
  5. DATEVALUE function, =YEAR(DATEVALUE("July 1, 2021"))
  6. NOW() or TODAY(), =YEAR(TODAY())
  7. Text date strings that Excel can recognize, =YEAR("2022-03-15")

Basic Example of Using YEAR Function:

Example Explanation:

Example of Using YEAR Function with Other Nested Functions:

S.no

Scenarios

Output

Formula Used

Comments

1

Extract the year from the date

1995

=YEAR(B4)

Basic use of YEAR function to extract year from B4

2

Check if the year is before 2000

TRUE

=YEAR(B4)<2000

Returns TRUE since 1995 is before 2000

3

Get age based on current year

30

=YEAR(TODAY()) – YEAR(B4)

Calculates age as of this year

4

Combine year with month name

1995-August

=YEAR(B4) & “-” & TEXT(B4,”mmmm”)

Merges year and full month name

5

Get first day of the year

01-Jan-95

=DATE(YEAR(B4),1,1)

Returns the first day of the same year

6

Get last day of the year

31-Dec-95

=DATE(YEAR(B4),12,31)

Returns the last day of the same year

7

Check if date is in leap year

FALSE

=IF(MOD(YEAR(B4),4)=0,IF(MOD(YEAR(B4),100)=0,MOD(YEAR(B4),400)=0,TRUE),FALSE)

Returns FALSE – 1995 is not a leap year

8

Convert to “Year Only” text format

1995

=TEXT(B4,”yyyy”)

Returns year as a text string, useful for formatting

9

Determine the decade

1990

=INT=YEAR(B4) & “-Q” & ROUNDUP(MONTH(B4)/3,0)(YEAR(B4)/10)*10

Calculates the decade by rounding down to the nearest 10

10

Create a “Year-Quarter” label

1995-Q3

Builds a label combining year and calendar quarter

Example Explanations:

That’s it. This tutorial was originally published on How to Use Excel YEAR Function?