How to Copy Excel Formulas Referencing the Previous Worksheet
Question details
The user needs to copy monthly Excel formulas into a new worksheet so that they automatically reference data from the previous month's worksheet, avoiding the need to manually edit sheet names in every formula.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating monthly tracking reports where each new month requires formulas to pull baseline data or compare values from the immediately preceding month's sheet.
- Observed behavior
- When copying formulas from one sheet to another, Excel does not automatically update the sheet name references (e.g., a formula referencing 'JAN' will still reference 'JAN' when copied to the 'MAR' sheet).
Verify that your monthly worksheets follow a consistent naming convention (such as JAN, FEB, MAR) and that the referenced data is located in the exact same cell addresses across all sheets.
Use the INDIRECT Function for Dynamic Sheet Referencing
Generate worksheet names dynamically by referencing a helper cell that contains the name of the previous month.
The INDIRECT function converts a text string into a valid cell reference. By combining text strings and cell values, you can change the referenced sheet name simply by updating a single cell in your current worksheet, rather than rewriting the formula.
In your new worksheet (e.g., the MAR sheet), type the name of the previous month's sheet (e.g., FEB) into an unused cell, such as A1.
Click on the cell where you want to perform the calculation or data pull.
Enter the formula using INDIRECT to build the reference. Type: =INDIRECT("'"&A1&"'!$D$31"). This tells Excel to look for cell D31 inside the sheet named in A1.
If you are using IF statements or other logic, nest the INDIRECT function inside it. For example: =IF(INDIRECT("'"&A1&"'!$D$31")>0, INDIRECT("'"&A1&"'!$D$31"), -INDIRECT("'"&A1&"'!$D$31")).
Press Enter to apply the formula. Whenever you copy this sheet for a new month, you only need to change the text in cell A1 to update all dependent formulas instantly.

Use Find and Replace to Update Sheet Names
A quick manual method to update static formulas in bulk after pasting them into a new monthly worksheet.
Easily Manage Multi-Sheet Data with WPS Office
WPS Spreadsheet makes it simple to manage complex, multi-sheet workbooks. You can seamlessly use advanced functions like INDIRECT and cross-sheet references to build automated monthly reports with ease.
- 1. Open your workbook: Launch WPS Spreadsheet and open your monthly tracking workbook.
- 2. Input the reference text: Type the target sheet name in a helper cell, such as A1, on your new monthly sheet.
- 3. Apply the INDIRECT function: Use the =INDIRECT("'"&A1&"'!$D$31") formula syntax to reference the previous sheet dynamically.
- 4. Calculate instantly: Press Enter to instantly fetch and calculate your data across worksheets.

Frequently Asked Questions
Why do I get a #REF! error when using the INDIRECT function?
A #REF! error typically occurs if the sheet name you are referencing is spelled incorrectly, contains spaces but isn't enclosed in single quotation marks within the formula string, or if the referenced worksheet has been deleted or renamed.
How can I copy the exact formula without changing cell references?
To copy a formula exactly as it is without Excel adjusting the relative cell references, click into the Formula Bar, highlight the text, press Ctrl+C, press Esc to exit the cell, and then paste the text directly into the target cell. Alternatively, use absolute references (like $A$1) before copying.
Can Excel automatically get the previous sheet's name without typing it in a cell?
Excel does not have a built-in function to dynamically grab the 'previous' sheet purely based on its physical tab order. To achieve this automatically without a helper cell, you would need to write and implement a custom VBA macro to determine the sheet index and fetch its name.




