Function Problems

Reference the Previous Year's Worksheet in an Excel Formula

Jason MillerJason Miller Nov 13, 2026 869 views

Question details

Create a formula that subtracts the same cell on the previous year's worksheet from the current year's value.

Reference the Previous Year's Worksheet in an Excel Formula
Product
Microsoft Excel
Device & OS
not provided
Scenario
A workbook contains worksheets named by year, and each sheet needs to calculate a change from the preceding year.
Observed behavior
A calculated year cannot be used directly as a worksheet reference, and formulas copied across sheets may show the same result if the sheet reference is not evaluated as intended.
Before you start

Save the workbook and confirm that each worksheet is named with a four-digit year, such as 2024 or 2025. Make sure the previous year's sheet exists and that C4 contains the value to compare.

Solution 1Recommended

Build the Previous-Year Reference from the Worksheet Name

Use this formula when each worksheet is named by year and you want the reference to update based on the current sheet.

CELL retrieves the saved workbook and worksheet name, while INDIRECT converts the calculated previous year into a worksheet reference. The A1 argument ties CELL to a cell on the formula's worksheet.

1
Save the workbook

Select File > Save before entering the formula. CELL("filename",A1) needs a saved workbook to return the worksheet name.

2
Enter the formula

On a year-named sheet, select a cell other than C4 and enter: =IFERROR($C$4-INDIRECT("'"&TEXT(VALUE(MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,255))-1,"0000")&"'!$C$4"),"").

3
Apply it to other sheets

Copy the formula into the corresponding cell on each year-named worksheet. Each sheet will subtract C4 on the preceding year's sheet from its own C4.

4
Check the results

If sheets show the same value unexpectedly, verify that the formula contains CELL("filename",A1), select Formulas > Calculation Options > Automatic, and recalculate with F9.

Build the Previous-Year Reference from the Worksheet Name
A blank result can hide an error: IFERROR returns a blank if, for example, the previous year's sheet is missing or the sheet name is not a year. Temporarily remove IFERROR to inspect the underlying error.
Calculate year-over-year changes

Reference the Previous Year's Sheet in WPS Spreadsheets

In WPS Spreadsheets, enter the current year in a cell and use INDIRECT to build a reference to the previous year's worksheet.

  1. 1. Open the workbook: Open your Excel workbook in WPS Spreadsheets and select a worksheet named with a four-digit year.
  2. 2. Enter the year: Type the worksheet's year as a number in B1, and confirm that the preceding year's worksheet exists.
  3. 3. Add the formula: Select a cell other than C4 and enter =IFERROR($C$4-INDIRECT("'"&TEXT($B$1-1,"0000")&"'!$C$4"),"").
  4. 4. Repeat and save: Enter the appropriate year and formula on the other worksheets, then select File > Save.
Compare the same cell across year-named worksheetsOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interfaceGet started with WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return a blank?

IFERROR hides errors by returning an empty string. Check that the previous year's sheet exists, the current sheet name or B1 contains a valid year, and the workbook is saved if you use CELL("filename",A1).

Why do several worksheets show the same result?

Check that CELL includes a worksheet-local reference, such as CELL("filename",A1), rather than omitting the reference. Then select Formulas > Calculation Options > Automatic and press F9 to recalculate.

Can I put the subtraction formula in C4?

No. Because the formula refers to the current sheet's C4, placing it in C4 creates a circular reference. Enter it in another cell.

How do I return the previous year's value without subtracting it?

If B1 contains the current year, enter =INDIRECT("'"&TEXT($B$1-1,"0000")&"'!$C$4") in the cell where you want to display the previous year's C4.