1. Core Concept & Syntax
The YEAR function in Microsoft Excel extracts the 4-digit year corresponding to a valid date serial number.
=YEAR(serial_number)
serial_number: A valid Excel date (cell reference like A2 or date formula like TODAY()).
Returns a four-digit integer between 1900 and 9999 (e.g. 2026).
Extracts the year without changing or deleting the original date value in the source cell.
Example:
2. ๐ฅ Live Interactive โ Extract Joining Year
Task: Extract the joining year for each employee using =YEAR(B2). Try editing any date to see the year recalculate!
| # | A (Employee) | B (Joining Date - Editable) | C (=YEAR(B2)) Extracted Year |
|---|---|---|---|
| 2 | Amit | =YEAR(B2) | |
| 3 | Priya | =YEAR(B2) | |
| 4 | Rahul | =YEAR(B2) | |
| 5 | Neha | =YEAR(B2) |
3. ๐ฅ Practical Business Use โ Sales Year Identification
Task: Extract the year from each order date to identify which orders belong to 2025:
| # | A (Order ID) | B (Order Date) | C (Sales Amount) | D (=YEAR(B2)) Year |
|---|---|---|---|---|
| 2 | ORD101 | 2024-03-15 | โน45,000 | =YEAR(B2) |
| 3 | ORD102 | 2024-07-22 | โน52,000 | =YEAR(B2) |
| 4 | ORD103 | 2025-02-10 | โน61,000 | =YEAR(B2) |
| 5 | ORD104 | 2025-09-18 | โน48,000 | =YEAR(B2) |
| 6 | ORD105 | 2026-01-12 | โน75,000 | =YEAR(B2) |
4. ๐ฅ Live Year-Based Filtering Sandbox
Once the Year column is populated via =YEAR(OrderDate), filtering by fiscal year becomes instantaneous:
| Order ID | Order Date | Customer | Region | Sales Amount | Year (=YEAR) |
|---|---|---|---|---|---|
| ORD-201 | 2023-04-12 | Acme Corp | North | โน28,000 | 2023 |
| ORD-202 | 2023-11-20 | Global Log | West | โน34,000 | 2023 |
| ORD-301 | 2024-02-14 | Apex Tech | South | โน52,000 | 2024 |
| ORD-302 | 2024-08-19 | Delta Sys | North | โน41,000 | 2024 |
| ORD-401 | 2025-01-10 | Zenith Retail | East | โน67,000 | 2025 |
| ORD-402 | 2025-05-22 | Prime Retail | South | โน59,000 | 2025 |
| ORD-403 | 2025-10-15 | Alpha Labs | West | โน82,000 | 2025 |
| ORD-501 | 2026-02-01 | Nova Health | North | โน91,000 | 2026 |
| ORD-502 | 2026-06-18 | Vertex Cloud | East | โน78,000 | 2026 |
5. Year-Based Business Analysis: Top Transactions
By isolating the year, analysts can answer critical executive questions like "Which year generated our largest single deal?"
6. Combining YEAR() with IF Statements
Task: Categorize employees based on whether they joined in 2026 using =IF(YEAR(B2)=2026, "2026 Joiner", "Other"):
| Employee | Joining Date | Status (=IF(YEAR(B2)=2026...)) |
|---|---|---|
| Amit | 2024-01-15 | =IF(YEAR(B2)=2026...) |
| Priya | 2025-06-20 | =IF(YEAR(B2)=2026...) |
| Rahul | 2026-03-10 | =IF(YEAR(B2)=2026...) |
| Neha | 2026-08-25 | =IF(YEAR(B2)=2026...) |
7. ๐ฅ Multi-Year Project Comparison
Task: Extract Start Year and End Year to detect projects spanning across multiple calendar years:
| Project | Start Date | End Date | Start Year | End Year | Span Type |
|---|---|---|---|---|---|
| Project A (ERP Migration) | 2024-02-10 | 2024-08-20 | โ | โ | โ |
| Project B (Cloud Transition) | 2025-06-15 | 2026-01-10 | โ | โ | โ |
| Project C (Security Audit) | 2026-03-05 | 2026-09-25 | โ | โ | โ |
8. ๐ฅ Data-Cleaning / Validation: Enforce 2026 Rule
Rule: All imported transaction records must belong to 2026. Use YEAR() to identify rogue historical dates:
| Record ID | Date (Editable) | Extracted Year | Validation Status |
|---|---|---|---|
| R001 | โ | โ | |
| R002 | โ | โ | |
| R003 | โ | โ | |
| R004 | โ | โ |
9. Important: Date Must Be a Real Excel Date Serial
YEAR() requires a valid date serial number. If a date was imported from a CSV as raw text (e.g. '2026.15.08), YEAR() will throw a #VALUE! error.
Real date serial numbers align to the RIGHT of the cell by default. Left-aligned dates are stored as raw text strings.
10. ๐ฅ Debugging Challenge: Fix YEAR() Mistakes
Diagnose and fix these common formula errors:
11. Real Business Scenario โ Annual Sales Dashboard
Select a fiscal year to dynamically inspect matching transactions and calculate annual sales totals:
| Order ID | Order Date | Customer | Sales Amount | Year Match Status |
|---|---|---|---|---|
| ORD-201 | 2023-04-12 | Acme Corp | โน28,000 | FY 2023 |
| ORD-202 | 2023-11-20 | Global Log | โน34,000 | FY 2023 |
| ORD-301 | 2024-02-14 | Apex Tech | โน52,000 | FY 2024 |
| ORD-302 | 2024-08-19 | Delta Sys | โน41,000 | FY 2024 |
| ORD-401 | 2025-01-10 | Zenith Retail | โน67,000 | โ Active in FY 2025 |
| ORD-402 | 2025-05-22 | Prime Retail | โน59,000 | โ Active in FY 2025 |
| ORD-403 | 2025-10-15 | Alpha Labs | โน82,000 | โ Active in FY 2025 |
| ORD-501 | 2026-02-01 | Nova Health | โน91,000 | FY 2026 |
| ORD-502 | 2026-06-18 | Vertex Cloud | โน78,000 | FY 2026 |
12. ๐ฅ Live Final Challenge: Yearly Transaction Audit
Task: Enter =YEAR(B2) to extract all 6 transaction years and audit multi-year trends:
| # | A (TX ID) | B (Transaction Date - Editable) | C (Amount) | D (=YEAR(B2)) Extracted Year |
|---|---|---|---|---|
| 2 | TX001 | โน25,000 | =YEAR(B2) | |
| 3 | TX002 | โน31,000 | =YEAR(B2) | |
| 4 | TX003 | โน42,000 | =YEAR(B2) | |
| 5 | TX004 | โน38,000 | =YEAR(B2) | |
| 6 | TX005 | โน55,000 | =YEAR(B2) | |
| 7 | TX006 | โน62,000 | =YEAR(B2) |
13. Quick Check Assessment Quiz
Test your understanding of Excel date extraction, formula rules, and annual reporting:
Excel YEAR() Assessment Quiz
Test your knowledge of the YEAR() formula syntax, date serials, and business filtering.
1. What value does the Excel formula =YEAR(A2) return when A2 contains the date "15/08/2026"?
14. Accuracy & Production Best Practices
Keep these professional guidelines in mind when working with dates in Excel:
- Always use YEAR() for Data Analysis: Formatting a cell as
yyyychanges only what appears on screen;YEAR()creates a true numeric integer (2026) for formulas, filtering, and PivotTables. - Dynamic Today Year: To extract the current calendar year automatically, nest
TODAY()inside:=YEAR(TODAY()). - Detecting Leap Years: Pair
YEAR()with date math to create robust financial models.