Yes, you can return the current year in Excel using the YEAR function combined with the TODAY function. This combination automatically updates the date every time you open the spreadsheet, ensuring the year is always current without manual entry. You only need a standard installation of Microsoft Excel on a Windows or Mac computer.
What You'll Need
- A computer with Microsoft Excel installed: This guide applies to Excel 2016, Excel 2019, Excel for Microsoft 365, Excel 2021, and Excel for Mac (versions compatible with modern functions).
- Basic knowledge of cell formatting: You should know how to select a cell or range of cells and type a formula.
- No internet connection is required: The TODAY function relies on your computer's internal clock, not an internet connection.
Step-by-Step
- Open your Excel workbook: Launch Microsoft Excel and open the specific spreadsheet where you need to display the current year. If you are starting from scratch, create a new blank workbook.
- Select the target cell: Click on the cell where you want the current year to appear. This cell will be the output of your formula.
- Enter the formula: Type the following formula exactly into the selected cell:
=YEAR(TODAY())
Note: The parentheses for TODAY are required. The YEAR function reads the date value returned by TODAY.
- Press Enter: Press the Enter key on your keyboard. The cell will immediately display the four-digit year corresponding to the current date on your computer.
- Verify the result: Check the cell. It should show, for example, 2024. If it shows a number like 45, your computer's date settings are incorrect (set to 1945, for instance).
- Format the output (Optional): While the formula above returns a number (2024), you may want to ensure it is formatted as a number. If you type the formula into a cell formatted as Text, Excel might convert it to a date serial number (e.g., 45,000) instead of the year. To fix this:
- Click the cell with the result.
- Go to the Home tab on the ribbon.
- In the Number group, click the dropdown menu and select Number.
- Drag to apply to other cells: If you need the current year in multiple cells (e.g., a column of dates), click the bottom-right corner of the cell containing your formula (the small square fill handle) and drag it down to fill the other cells.
Common Mistakes
When working with dynamic date functions in Excel, users often encounter issues due to how the software interprets cell formats and system settings. Recognizing these common pitfalls is essential for obtaining accurate results.
1. The Result is a Serial Number, Not the Year. If your cell displays a long number like 45242 instead of 2024, this is a date serial number. Excel stores dates as numbers, where 1 represents January 1, 1900. The YEAR function expects a date serial number. If the cell was formatted as Text before you entered the formula, Excel will not convert the formula's output to a number; it will display the raw serial value returned by TODAY(). To resolve this, change the cell formatting to Number using the steps outlined in Step 6 of the guide above.
2. Entering the Year Manually. A frequent mistake is entering the year directly into the cell (e.g., typing "2024"). This makes the data static. If you open this spreadsheet next year, it will still show 2024, which defeats the purpose of using Excel for dynamic reporting. Always use the =YEAR(TODAY()) formula to ensure the data remains accurate.
3. Relying on the TODAY function in Print Preview. The TODAY function is volatile, meaning it recalculates every time the workbook is opened or a change is made. If you are preparing a static report and want the year to remain fixed on the printed page, the formula will update in the background. For a static print, you can copy the cell containing the formula, right-click the target cell, and select Paste Values (or Paste Special > Values) to convert the dynamic result into a permanent number.
Tips
Mastering Excel date functions requires understanding how the software interacts with your system's clock and how to structure formulas for different scenarios.
1. Use TODAY() for Dynamic Dashboards. The combination of TODAY() and YEAR() is ideal for dashboards, headers, or summary rows that need to show the current fiscal or calendar year. Because the TODAY function is volatile, this entire sheet will automatically update to reflect the new year on January 1st without any user intervention.
2. Combine with EOMONTH for Fiscal Years. If your fiscal year ends in a month other than December, you can modify the formula slightly. For a fiscal year ending in March, you could use =YEAR(TODAY())-IF(MONTH(TODAY())<4,1,0). This checks if the current month is before April; if so, it subtracts 1 from the current year to show the correct fiscal year.
3. Keyboard Shortcuts for Speed. To speed up data entry, use keyboard shortcuts. Press Alt + = (Windows) or Command + Shift + T (Mac) to quickly insert the SUM function. While not a date function, this familiarity helps navigate the interface. For the YEAR function, there is no specific shortcut, but typing =YEAR( is a fast way to start the sequence.
4. Setting the System Clock. Since the TODAY function relies on your computer's system clock, ensure your computer's date and time are set correctly in the Windows or macOS System Settings. If your computer's clock is off by a day, the YEAR function will return the incorrect year.
Troubleshooting
If the YEAR function is not returning the expected value, follow these steps in order to diagnose and resolve the issue.
If the cell displays a long number (e.g., 45242):
This indicates a formatting issue. The formula is working, but the cell is set to Text format. Go to the Home tab, locate the Number group on the ribbon, and click the dropdown menu. Select Number. The long serial number will instantly convert to the correct four-digit year.
If the cell displays #VALUE!:
This error usually occurs if the TODAY function is missing parentheses or if it is not the only argument inside the YEAR function. Ensure your formula is exactly =YEAR(TODAY()). The YEAR function requires exactly one argument: a date. If you type =YEAR(TODAY) (missing parentheses), Excel will look for a function named TODAY, fail to find it, and return the #VALUE! error.
If the result is incorrect (e.g., showing 2023 instead of 2024):
Check your computer's system date and time settings. The TODAY function pulls directly from the system clock. If your computer is set to a date in the past, the YEAR function will return the corresponding past year. Go to your operating system's System Settings and verify the date is correct.
If the result updates every time you click a cell:
This is normal behavior for the TODAY function. It is a volatile function that recalculates whenever the worksheet is recalculated. To stop the recalculation and freeze the value, copy the cell containing the formula, right-click the cell again, and choose Paste Values from the context menu. This replaces the formula with the static number.
Frequently Asked Questions
Does the YEAR function work on Macs?
Yes, the YEAR function works identically on Mac as it does on Windows. It relies on the system clock of the operating system, so as long as your Mac's date is set correctly, the formula will return the current year.
Why is my Excel file showing #NAME?
A #NAME? error typically means Excel does not recognize the name of the function you typed. In this specific scenario, it is often caused by a typo in the formula, such as typing =YEAT(TODAY()) instead of =YEAR(TODAY()). Double-check your spelling and ensure you are using the correct function name.
Can I use this formula in Google Sheets?
Yes, the functions YEAR and TODAY are standard in Google Sheets. You can use the exact same formula =YEAR(TODAY()) in a Google Sheets cell, and it will function identically, provided your spreadsheet is linked to the correct time zone or your computer's clock is accurate.
Does the TODAY function update in Excel Online?
Yes, the TODAY function is supported in Excel Online (the web version of Excel). As long as the file is open in a browser and the browser has access to the correct system time (usually synchronized with the user's device), the formula will display the current year.
How do I get the current year for a specific date?
If you have a specific date in a cell (for example, cell A1 contains the date "12/15/2023"), you can use the YEAR function to extract the year from that specific date by referencing the cell. The formula would be =YEAR(A1). This is useful if you are calculating something like the age of a person on their birthday, where the birthday is a fixed date but the current date is dynamic.