SHEETS Function

Excel 2013+

Summary

The Excel SHEETS function counts the total number of sheets within a specified reference or the entire workbook. It provides quick insight into workbook structure by including all sheet types regardless of visibility status.

Syntax

SHEETS([reference])

Parameters

Parameter Type Required Description
reference Reference No Optional reference to count sheets within. Omit for total workbook sheet count.

Using the SHEETS Function

SHEETS offers a straightforward method to determine sheet quantities in workbooks or specific references. Perfect for dynamic dashboard creation, sheet management utilities, and workbook analysis tools where understanding structure is essential.

Common SHEETS Examples

Count All Workbook Sheets

=SHEETS()

Returns total number of sheets in current workbook (all types, all visibility states).

Count Sheets in 3D Reference

=SHEETS(Sheet2:Sheet4!A1)

Counts sheets included in 3D reference spanning Sheet2 through Sheet4.

Named Range Sheet Count

=SHEETS(My3DRef)

Returns sheet count for predefined named 3D reference.

Frequently Asked Questions

Yes, SHEETS counts all sheets including visible, hidden, and very hidden worksheets plus chart/macro/dialog sheets.

SHEETS returns #REF! error for invalid or non-existent references.

No, SHEETS only works within the current workbook.

Common Errors and Solutions

#REF!

Cause: Invalid or non-existent reference provided

Solution: Verify reference syntax and ensure referenced sheets exist.

#NAME?

Cause: Undefined named range reference

Solution: Check named range spelling or create the named range.

Notes

  • SHEETS counts every sheet type: worksheets, chart sheets, macro sheets, dialog sheets
  • Not available in Excel Object Model (VBA equivalent exists)
  • Maximum return value depends on workbook's sheet limit (usually 255+ sheets)

Compatibility

Available in: Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365, Excel Online

Not available in: Excel 2010, Excel 2007, Excel 2003, Excel XP

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2013+