Excel YEAR Function

The YEAR function in Microsoft Excel extracts the year component from a date as a four-digit number. It is useful for analyzing or grouping date-based data by year.

Key Topics

Overview of YEAR Function

The YEAR function returns the year of a given date, enabling easy extraction for calculations or reporting. It is often used with other date functions for custom date manipulations or annual summaries.

YEAR Function Syntax

The syntax for the YEAR function is as follows:

Syntax: =YEAR(serial_number)

Parameters:

  • serial_number: The date or cell reference containing a date (required).

Implementation Examples

Below are examples of how to use the YEAR function in different scenarios.

Example 1: =YEAR(B2) — Extracts the year from the date in B2.

Example 2: =YEAR(TODAY()) — Returns the year of the current date.

Example 3: =YEAR(DATE(2025, 6, 3)) — Returns 2025, the year from 06/03/2025.

Sample Dataset (Excel-style View)

Below is a demo dataset styled like Excel, showing how the YEAR function can be used to extract the year from transaction dates.

A B C
1 Transaction ID Transaction Date Year of Transaction
2 TRX001 01/15/2024 =YEAR(B2)
3 TRX002 06/10/2024 =YEAR(B3)
4 TRX003 12/22/2024 =YEAR(B4)
5 TRX004 03/05/2025 =YEAR(B5)
6 TRX005 06/30/2025 =YEAR(B6)

Note: In the dataset, column C uses =YEAR(B2) to extract the year from the transaction date in B2. The formula is applied to each row to show the year of each transaction.

Key Takeaways

  • The YEAR function extracts the year from a date as a four-digit number.
  • It works with dates, TODAY(), or DATE function outputs.
  • It is useful for grouping or analyzing date-based data by year.
  • Common uses include annual reports or financial summaries.
  • The sample dataset demonstrates YEAR applied to extract transaction years.