Function Problems

WPS Spreadsheet: Use an Excel Header to Reference Another Worksheet

Nimra MalikNimra Malik Nov 12, 2026 868 views

Question details

The user needs to use a header value as a worksheet name and retrieve matching data from that worksheet.

WPS Spreadsheet: Use an Excel Header to Reference Another Worksheet
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A workbook contains similarly structured worksheets, and a header cell identifies which worksheet should supply data for a calculation.
Observed behavior
The desired worksheet reference must change dynamically based on the value in the header cell.
Before you start

Verify that each header value exactly matches an existing worksheet name, including spaces and date formatting. Confirm that the source sheets use consistent columns for the lookup criteria and values.

Solution 1Recommended

Use INDIRECT with the header value to reference another worksheet

Use this formula-based method when the worksheet name is stored in a header cell and the source sheets share a consistent layout.

INDIRECT converts text into a cell or range reference. Combining the header cell with a quoted sheet reference lets the formula point to a different worksheet as the header changes.

The example below uses the sheet name in B2, matches the criterion in A3 against column A, and sums corresponding values from column F.

1
Enter the dynamic formula

In the result cell, choose the Formula Bar or a blank cell and enter =SUMIFS(INDIRECT("'"&B$2&"'!$F$1:$F$1000"),INDIRECT("'"&B$2&"'!$A$1:$A$1000"),$A3).

2
Check the header reference

Make sure B2 contains the exact worksheet name, including any spaces. The single quotes around the dynamic sheet name allow names with spaces to work correctly.

3
Fill the formula

Select the formula cell and drag its fill handle across and down, or use Home > Fill to copy the formula to the required rows and columns.

4
Test another worksheet

Replace the value in B2 with another valid sheet name and confirm that the result updates from the newly referenced worksheet.

Formula result: If the header does not match a worksheet name exactly, INDIRECT returns a reference error. Correct the header text or add error handling such as IFERROR around the formula.

Build Dynamic Cross-Sheet References in WPS Spreadsheet

WPS Spreadsheet lets you use INDIRECT formulas to convert a header value into a worksheet reference, match criteria, and return data from the selected sheet. You can fill the formula across and down while maintaining Excel-compatible workbook formats.

  1. 1. Open the workbook: Launch WPS Office, select Spreadsheet, and open the workbook containing the header and source worksheets.
  2. 2. Confirm sheet names and ranges: Check the header cell and verify that each referenced worksheet uses consistent criteria and value columns.
  3. 3. Enter the formula: Select the result cell and enter =SUMIFS(INDIRECT("'"&B$2&"'!$F$1:$F$1000"),INDIRECT("'"&B$2&"'!$A$1:$A$1000"),$A3).
  4. 4. Fill and verify: Drag the fill handle across and down, then change the header value to confirm that the returned data comes from the selected worksheet.
Create worksheet references dynamically from header values.Retrieve matching data with familiar SUMIFS formulas.Fill formulas across multiple headers and down multiple criteria rows.Open, edit, and save Microsoft Excel .xlsx files with compatible formatting and formulas.
microsoft office alternative - wps office

Frequently Asked Questions

What formula uses a header cell as the worksheet name in WPS Spreadsheet?

Use INDIRECT to create the reference dynamically. For example, =SUMIFS(INDIRECT("'"&B$2&"'!$F$1:$F$1000"),INDIRECT("'"&B$2&"'!$A$1:$A$1000"),$A3) uses B2 as the worksheet name and A3 as the matching criterion.

Why does the dynamic worksheet reference return an error?

The header value probably does not exactly match a worksheet tab name. Check spelling, spaces, date formatting, and punctuation. Keep the single quotes in the INDIRECT expression for sheet names containing spaces.

Can I fill the INDIRECT formula across and down?

Yes. Use mixed references such as B$2 for the header row and $A3 for the criteria column, then drag the fill handle across and down to adjust the intended references.

Is INDIRECT suitable for a workbook with many worksheets?

INDIRECT is convenient for smaller or moderately sized workbooks, but it is volatile and can slow large files. For many sheets or frequent updates, use a consolidated table or an automated data-combining workflow.