How to List Sheet Index Numbers in Excel

Learn multiple Excel methods to list sheet index numbers with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
10 min read • Last updated: 7/2/2025

How to List Sheet Index Numbers in Excel

Why This Task Matters in Excel

For anyone who builds multi-sheet workbooks—financial models, project trackers, data consolidation files, or dashboards—the ability to reference sheets by their position is more than a convenience; it is often essential. Many complex models refer to sheets programmatically: “take last month’s sheet, copy it, move it to the end, update formulas that refer to the previous sheet.” When you automate any of those steps—whether with formulas, Power Query, or VBA—knowing the sheet index number becomes critical.

Imagine a regional sales workbook with 60 monthly tabs. If you need to create a summary that always pulls numbers from the tab immediately before the current month, formula logic based on the sheet index is simpler and less error-prone than hard-coding the previous sheet’s name. In auditing scenarios, compliance teams inspect very large workbooks and need a quick inventory: “Which sheet sits in position 17, and why is it hidden?” Being able to list sheet index numbers and names makes the workbook self-documenting.

Across industries—finance, manufacturing, education, and IT—workbooks are sent between teams who might rename or reorder sheets without telling you. Formulas that depend on sheet order (for example, a running balance accumulating across tabs) break quietly when sheet order changes. A visible list of sheet names and their index numbers acts like a map: users can verify order, detect missing sheets, and understand how a model flows.

Excel is uniquely suited for this task because it offers multiple levels of tooling: built-in worksheet functions such as SHEET and SHEETS, the older but still powerful macro-sheet function GET.WORKBOOK, Power Query for modern ETL, and of course VBA for fully automated reporting. Not knowing how to produce a sheet index list can lead to fragile models, time-consuming manual audits, and costly mistakes when the wrong sheet is referenced. Mastering the techniques below ties directly into broader Excel competencies—dynamic arrays, named ranges, legacy compatibility, and automation.

Best Excel Approach

The fastest and most reliable native solution for modern Excel (Excel 2013 and later) is to combine the SHEET() function with a simple list of sheet names. SHEET() returns the index number of any reference—cell, range, or sheet name string—relative to the workbook’s internal order (left to right as seen in the tabs). When paired with a static or dynamically generated list of sheet names, you instantly obtain an up-to-date index map.

Why is this approach best?

  • It requires no macros, so it is safe for environments that block VBA.
  • It recalculates automatically when sheets are added, deleted, hidden, or moved.
  • It is fully supported in Excel 2013, 2016, 2019, 2021, and Microsoft 365 across Windows and macOS.

Prerequisites: The workbook must not be in compatibility mode (.xls). You need a column (or dynamic array) of sheet names available—either entered manually, pulled from GET.WORKBOOK, or generated with newer TEXTSPLIT techniques in 365.

Recommended syntax (cell-by-cell example):

=SHEET("'" & A2 & "'!A1")

If A2 contains the text Sales_Jan, the formula concatenates an apostrophe-wrapped sheet name and “!A1” to form a valid reference: \'Sales_Jan\'!A1. SHEET then returns the sheet’s current position.

Alternative for dynamic arrays (365) using the legacy GET.WORKBOOK trick:

=MAP(SheetNames#,LAMBDA(nm,SHEET(INDIRECT("'"&nm&"'!A1"))))

Here, SheetNames# is a spilled array of all sheet names, and MAP applies the SHEET function to each element, yielding a parallel array of index numbers.

Parameters and Inputs

  • Sheet Name (required, text): The exact name as it appears on the tab. It is case-insensitive but must include any spaces or special characters.
  • Reference Suffix (optional, default “!A1”): You may point at any cell; A1 is conventional because it exists on every sheet.
  • Named Range / Dynamic Array (optional): Instead of single cells, you can feed a spilled list of names to a formula such as MAP or BYROW.
  • Data preparation: Remove trailing spaces, check for duplicate names, and ensure names do not exceed 31 characters (Excel’s limit).
  • Validation: Use Data Validation with a list of existing sheet names to avoid typos.
  • Edge cases: Hidden sheets still return an index; very hidden sheets do as well. SHEET returns #REF! if the sheet name does not exist.

Step-by-Step Examples

Example 1: Basic Scenario

Scenario: A small workbook contains four tabs: Dashboard, Data, Lookup, and Summary. You want a simple table on Dashboard that shows each tab’s index.

  1. In Dashboard, create a header row in [A1:B1]: “Sheet Name” | “Index”.
  2. Type the sheet names in [A2:A5] exactly as they appear: Dashboard, Data, Lookup, Summary.
  3. In B2 enter:
=SHEET("'" & A2 & "'!A1")
  1. Copy B2 down to B5. The results will be 1, 2, 3, 4 because Dashboard is leftmost.
  2. Move the Lookup tab so it sits between Dashboard and Data. The table instantly updates to 1, 3, 2, 4, confirming that Lookup is now index 2.

Why it works: SHEET reads the workbook’s internal sheet list, not the order typed by users. Concatenating the apostrophe (‘) guarantees names with spaces or punctuation are valid references.

Troubleshooting tips: If you see #REF!, double-check spelling. If your workbook was saved in .xls format, SHEET may not be available—convert to .xlsx first.

Example 2: Real-World Application

Scenario: A monthly financial workbook has one tab per month, spanning 2017-2026 (120 sheets). You need to build a rolling 12-month summary that always references the previous 12 sheets relative to the Summary tab, regardless of renaming or new months added.

  1. Insert a new sheet called SheetIndex just before Summary.
  2. Press Alt + F3 to open Name Manager, click New, and create the name AllSheets_ref with this formula:
=GET.WORKBOOK(1)

(The 1 argument tells Excel to return full sheet references.)
3. In SheetIndex!A2 enter:

=TRANSPOSE(TRIM(MID(SUBSTITUTE(AllSheets_ref,"]",REPT(" ",50)),2,50)))

This spills all sheet names into column A.
4. In B2 enter:

=SHEET(INDIRECT("'"&A2&"'!A1"))

and copy down for every sheet name returned.
5. In Summary, to pull the sales total from the sheet immediately to the left, use:

=INDIRECT("'" & INDEX(SheetIndex!A:A, MATCH(SHEET()+-1, SheetIndex!B:B,0)) & "'!B10")

Now Summary dynamically links to the sheet whose index is one less than Summary itself. When you add a new month tab, the index list updates, and the summary automatically points to the correct sheet.

Business impact: Financial analysts save hours each month and avoid errors when new monthly tabs are added out of sequence.

Performance note: The GET.WORKBOOK call is volatile but lightweight for 120 sheets.

Example 3: Advanced Technique

Scenario: You maintain a master workbook containing hundreds of region-specific tabs (EMEA_Feb2024, APAC_Mar2024, etc.). You must regularly deliver a table of sheet order to auditors, but macros are banned. You also want to highlight any hidden sheet.

  1. In cell A2 of a blank sheet named AuditMap, enter:
=LET(
 sheets,GET.WORKBOOK(1),
 names,TRANSPOSE(TRIM(MID(SUBSTITUTE(sheets,"]",REPT(" ",50)),2,50))),
 idxs,MAP(names,LAMBDA(n,SHEET(INDIRECT("'"&n&"'!A1")))),
 visible,MAP(names,LAMBDA(n,IF(SHEET(INDIRECT("'"&n&"'!A1"))=SHEET(),"-",IF(ISERROR(GET.CELL(44,INDIRECT("'"&n&"'!A1"))),"Hidden","Visible")))),
 HSTACK(names,idxs,visible)
)
  1. The LET function stores arrays: names, idxs, and visibility flag (GET.CELL code 44 returns 0 for hidden, 1 for visible).
  2. HSTACK combines the arrays into three columns that spill automatically: Sheet Name | Index | Visible/Hidden.
  3. Apply conditional formatting to the Visible/Hidden column: red fill if the text equals “Hidden.”
  4. Convert the spilled range to a Table ([Ctrl+T]) for filter and sort capabilities.

Advanced points:

  • LET reduces repeated evaluation, improving performance in large workbooks.
  • MAP applies functions element-wise without helper columns, maintaining a flexible dynamic array.
  • Even very hidden sheets appear and are correctly flagged because GET.CELL bypasses user interface status.

Tips and Best Practices

  1. Lock the index list on a dedicated sheet and protect it to prevent accidental edits that break references.
  2. Combine dynamic arrays with Excel Tables so new sheets are detected and formulas expand automatically.
  3. When using INDIRECT, keep calculation options on Automatic; otherwise, references do not update until you press F9.
  4. Use LET to cache GET.WORKBOOK results—especially in files with hundreds of sheets—to reduce volatility overhead.
  5. For enterprise workbooks, document the index list in a hidden “Control” tab and link all cross-sheet formulas to that tab, creating a single source of truth.
  6. Periodically audit hidden sheets using the visibility flag example to ensure no undocumented sheets sneak into production.

Common Mistakes to Avoid

  1. Misspelling sheet names in the reference string leads to #REF! errors. Always validate via Data Validation or pull names programmatically.
  2. Forgetting apostrophes around names with spaces (“Sales 2024”) breaks the reference. Always enclose names inside single quotes.
  3. Assuming index numbers start at zero—Excel starts at one, so “first sheet” equals index 1.
  4. Relying on manual lists: if you move sheets later, static typed names fall out of sync. Prefer dynamic GET.WORKBOOK or Power Query extraction.
  5. Ignoring hidden or very hidden sheets: your index list will misalign if formulas skip them. Use functions that report all sheets regardless of visibility.

Alternative Methods

MethodRequires Macros?DynamicWorks in 365 Web?ProsCons
SHEET + manual listNoSemi (needs manual list)YesSimple, native, non-volatileManual maintenance
GET.WORKBOOK + dynamic arrayNo (uses legacy macro functions but allowed)YesNo (excel web blocks)Fully dynamic, no VBANeeds Name Manager setup; volatile
Power QueryNoYes (refresh)Read-only in webFriendly UI, exports clean tableRequires refresh; not realtime
VBA macroYesYesNoFully automated, customizableSecurity prompts, disabled on some systems

When workbook logic demands instant recalculation, SHEET wins. For documentation or infrequent reporting, Power Query offers a clean, code-free extraction. VBA remains best for elaborate workflows—batch exporting sheet names to external files, for example.

FAQ

When should I use this approach?

Use the SHEET function when you need live index numbers that recalculate every time a sheet is inserted, deleted, or moved—ideal for running balances, rolling time frames, or audit dashboards.

Can this work across multiple sheets?

Absolutely. SHEET works on any reference, including ranges on other sheets. By combining SHEET with a spilled array of sheet names (e.g., MAP or BYROW), you can produce index numbers for every worksheet in the workbook simultaneously.

What are the limitations?

SHEET does not exist in workbooks saved in the legacy .xls format. In the web edition of Excel, legacy macro functions like GET.WORKBOOK are blocked. INDIRECT references are volatile, which can slow extremely large models.

How do I handle errors?

Wrap your SHEET calls inside IFERROR:

=IFERROR(SHEET("'"&A2&"'!A1"),"Sheet missing")

This prevents #REF! from cluttering dashboards. For GET.WORKBOOK methods, validate that the name AllSheets_ref still exists if you copy sheets between workbooks.

Does this work in older Excel versions?

SHEET and SHEETS arrived in Excel 2013. In Excel 2010 and earlier, rely on GET.WORKBOOK via Name Manager or VBA macros. The sample VBA below runs even in Excel 2007.

What about performance with large datasets?

The SHEET function itself is lightweight. Performance issues typically stem from INDIRECT, which is volatile. Use LET to cache repeating expressions and keep index formulas on a separate sheet to minimize cross-sheet recalculation chains.

Conclusion

Mastering the skill of listing sheet index numbers equips you to build resilient, self-documenting workbooks. Whether you use simple SHEET formulas, legacy GET.WORKBOOK tricks, Power Query extractions, or full VBA automation, each technique solves a different business problem—from live rolling summaries to audit reports. As you apply these methods, you deepen your understanding of dynamic arrays, named ranges, and workbook structure—cornerstones of advanced Excel proficiency. Practice the examples, choose the approach that best matches your environment, and integrate a sheet index map into every multi-sheet model for a professional, error-resistant workflow.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.