Function Problems

How to Dynamically Reference an Input Sheet Across Hundreds of Worksheets

Phi Hung VoPhi Hung Vo Nov 2, 2026 869 views

Question details

The user needs a method to reference a unique row from a master Input Sheet in cell A2 across approximately 800 individual worksheets without manually entering the formula on every single sheet.

How to Dynamically Reference an Input Sheet Across Hundreds of Worksheets
Product
Spreadsheet
Device & OS
not provided
Scenario
Distributing specific row data from a central master sheet into hundreds of similarly structured child worksheets.
Observed behavior
Currently, formulas are being entered manually on each of the 800 worksheets, which is highly inefficient and prone to errors.
Before you start

Before applying bulk formulas or running macros, always save a backup copy of your workbook, as grouping sheets or executing VBA code can overwrite existing data.

Solution 1Recommended

Use INDIRECT and CELL Functions to Extract Sheet Names Dynamically

This method extracts the sheet's index number from its name and uses it to automatically determine which row to reference on the Input Sheet.

By combining INDIRECT, CELL, MID, and FIND, Excel can read the current worksheet's name. If your sheets are sequentially named (e.g., Sheet1, Sheet2), you can extract that number to offset the row reference dynamically.

Your workbook must be saved at least once for the CELL("filename") function to work properly.

1
Group your worksheets

Click on the first worksheet tab (e.g., Sheet1), hold down the 'Shift' key, and click on the last worksheet tab (e.g., Sheet800). This groups the sheets so any formula entered will be applied to all of them simultaneously.

2
Select the target cell

With the sheets grouped, click on cell A2 (or the cell where you want the dynamic reference to appear).

3
Enter the dynamic formula

Type the following formula and press Enter: =INDIRECT("'Input Sheet'!A"&SUBSTITUTE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255),"Sheet","")+5)

4
Ungroup the worksheets

Right-click any worksheet tab at the bottom and select 'Ungroup Sheets' to prevent accidentally overwriting data during further edits.

Use INDIRECT and CELL Functions to Extract Sheet Names Dynamically
Adjusting the Row Offset: In the formula above, '+5' is used as an offset. If 'Sheet1' needs to pull from row 6 of the Input Sheet, 1 + 5 = 6. Adjust this number based on where your data actually starts on the Input Sheet.

Easily Manage Massive Workbooks with WPS Spreadsheet

Handling hundreds of worksheets requires a robust and highly compatible spreadsheet tool. WPS Spreadsheet fully supports advanced functions like INDIRECT and CELL, as well as VBA macros, making it easy to automate tasks without performance drops.

  1. 1. Open your large workbook in WPS Spreadsheet: Launch WPS Office and open your .xlsx or .xlsm file containing the hundreds of worksheets.
  2. 2. Access the Developer tools: Navigate to the 'Developer' tab on the ribbon to access the VBA Editor if you prefer the macro approach.
  3. 3. Apply your automation: Either group the sheets to paste the INDIRECT formula or run the VBA script to instantly map your data across all 800 sheets.
Fully compatible with Microsoft Excel formulas, functions, and VBA macros.Optimized performance for handling massive workbooks with hundreds of sheets without lagging.Tabbed interface allows you to view and navigate between multiple complex files seamlessly.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the CELL("filename") function return an error or empty result?

The CELL function relies on the file path to determine the worksheet name. If you are working on a brand-new workbook that has not been saved yet, it will return an empty string. Save your workbook first and recalculate.

Can I use 3D references instead of the INDIRECT function?

3D references (like =SUM(Sheet1:Sheet800!A1)) are useful for aggregating the exact same cell across multiple sheets. However, they cannot be used to pull different rows dynamically from a single master sheet into multiple individual sheets.

Will having 800 INDIRECT formulas slow down my workbook?

Yes, INDIRECT is a 'volatile' function, meaning it recalculates every time any change is made in the workbook. If you notice performance issues with 800 sheets, the VBA macro method is recommended as it places standard, non-volatile references instead.

How do I remove the 'Sheet' prefix if my worksheets are named differently?

In the formula method, the SUBSTITUTE function targets the text "Sheet" and replaces it with nothing. If your sheets are named "Data1", "Data2", simply change "Sheet" to "Data" in the SUBSTITUTE parameters.