ID EN
#Information

SHEETS

Excel Functions

Get number of sheets in a reference

Syntax

EXCEL
=SHEETS([reference])

Arguments

Parameter Description
reference [optional] A valid Excel reference.

Return Value

Sheet count

Details

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. 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:

Examples

Examples

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

EXCEL
=SHEETS()
Examples

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

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

See Also

SHEET