SHEETS Function

Returns the number of sheets in a reference.

Category

Information

Available in

Excel 2013+, Microsoft 365

Returns

A count of sheets

Want to practice SHEETS in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

With no argument, SHEETS counts every sheet in the workbook — including hidden ones and chart sheets.

Give it a 3D reference such as Jan:Dec!A1 and it counts the sheets that reference spans.

Syntax

=SHEETS([reference])

Arguments

ArgumentRequired?What it does
referenceOptionalA reference, often a 3D one like Jan:Dec!B5. Omit it to count all sheets.

Examples

Example 1 — Counting sheets

A workbook with Summary, twelve month tabs (Jan to Dec) and a hidden Lists tab.

AB
1FormulaResult
2=SHEETS()14
3=SHEETS(Jan:Dec!B5)12
4=SHEETS(Jan!B5)1

Example 2 — Average per month so far

Add up B5 across the month tabs, then divide by how many tabs there are.

=SUM(Jan:Dec!B5)/SHEETS(Jan:Dec!B5) Explain

Add a new month tab between Jan and Dec and both parts pick it up automatically.

Common mistakes

  • Hidden sheets are counted. SHEETS() includes hidden and very hidden sheets, so it can be larger than the tabs you see.

Notes

  • Our practice Sandbox doesn't support 3D references yet, so SHEETS() with no argument is the form to try there.
  • Related functions: SHEET, INFO.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.