Exceljet

Quick, clean, and to the point

Excel SHEETS Function

Excel SHEETS function
Summary 

The Excel SHEETS function returns the total number of sheets in a given reference. When no arguments are supplied SHEETS returns the total number of sheets in the workbook.

Purpose 
Get number of sheets in a reference
Return value 
Sheet count
Syntax 
=SHEETS ([reference])
Arguments 
  • reference - [optional] A valid Excel reference.
Version 
Usage notes 

The SHEETS function returns the total number of sheets in a given reference. SHEETS takes one argument, reference, which should be a cell reference, or a 3D reference. When no references are supplied SHEETS returns the total number of sheets in the workbook. The SHEETS function includes hidden sheets.

Examples

For example, in a workbook that contains 5 sheets, the following formula will return 5:

SHEETS can be used to report the sheet count in 3D references as well. For example, in a workbook with three sheets (Sheet1 through Sheet3) in numeric order, the formulas below return results as shown:

=SHEETS(Sheet1:Sheet1!A1) // returns 1
=SHEETS(Sheet1:Sheet2!A1) // returns 2
=SHEETS(Sheet1:Sheet3!A1) // returns 3

Notes

  • If the reference is omitted, SHEETS returns the total sheets in a workbook.
  • SHEETS includes hidden sheets in the count.
  • SHEETS will report sheet count in 3D references.
  • The SHEET function returns the index of a sheet. SHEETS returns a count.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.

Excel foundational video course
Excel Pivot Table video training course
Excel formulas and functions video training course
Excel Charts video training course
Video training for Excel Tables
Dynamic Array Formulas