Dates function
YEAR
Which year is this date in?
Purpose
Pull the year out of a date
Returns
A four digit number
Syntax
=YEAR(date)
| Argument | Required | What goes here |
|---|---|---|
date | Required | The cell holding the date, usually A2. |
How to use YEAR
YEAR returns the year part of a date as a number you can compare and total against.
Its use is grouping and cut-off: everything dated in this year, everything that belongs in the year just closed.
It is nearly always paired with MONTH, because a month on its own does not say which year it is in and a report that mixes two Octobers is worse than one that reports neither.
Examples
Every result below is worked out by the same evaluator that marks your answers, on the sheet shown here.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Reporting date | 2026-10-31 | |||
| 2 | |||||
| 3 | Invoice | Invoice date | Terms (days) | Amount | Customer |
| 4 | INV-9001 | 2026-07-14 | 30 | 1200 | Calder Utilities |
| 5 | INV-9002 | 2026-08-29 | 30 | 640 | Brightwell Paper |
| 6 | INV-9003 | 2026-09-03 | 45 | 3100 | Meridian Freight |
| 7 | INV-9004 | 2026-09-30 | 14 | 455 | Thornbury Print |
| 8 | INV-9005 | 2026-10-12 | 30 | 2080 | Calder Utilities |
| 9 | INV-9006 | 2026-10-27 | 60 | 725 | Ashgrove Catering |
| Formula | Result |
|---|---|
=YEAR(B4)The year on the invoice. | 2026 |
=YEAR(B4)=YEAR(B1)Same year as the reporting date, so this invoice belongs in this year's figures. | TRUE |
=IF(AND(YEAR(B9)=YEAR(B1),MONTH(B9)=MONTH(B1)),"In period","Out of period")The cut-off test written properly, with the year checked as well as the month. | In period |
Notes
- Dates on this site are held as text in the form 2026-10-31, which already sorts and compares in date order.
Related
Practise YEAR in Unit 25
A reference tells you what it does. A unit makes you use it.