SHEETS

Formulas / SHEETS
Calculate the number of sheets in a reference.
=SHEETS(reference)
  • reference - [OPTIONAL] a reference for which SHEETS should calculate the number of sheets

Examples

  • =SHEETS(Sheet1:Sheet2!A1)

    The SHEETS function is a useful tool for quickly getting the number of sheets in a workbook. This example returns 2 because it takes the second sheet in the workbook as the reference.

  • =SHEETS(Sheet1:Sheet3!A1)

    The SHEETS function can also be used to return the number of sheets in a range. This example returns 3 because it takes the third sheet in the workbook as the reference.

  • =SHEETS()

    The SHEETS function can also be used to return the number of sheets in a workbook without a range. This example returns the number of sheets in the workbook.


Summary

The SHEETS function enables users to quickly identify the total number of sheets in a given reference, including visible, hidden, and very hidden worksheets. The reference argument is optional.

  • The SHEETS function returns the number of sheets in a reference, including visible, hidden, and very hidden worksheets.

Frequently Asked Questions

What does the SHEETS function do?
The SHEETS function returns the number of sheets in a reference. This includes visible, hidden, and very hidden worksheets.
What is the syntax for the SHEETS function?
The syntax for the SHEETS function is: SHEETS(reference).
What is the difference between SHEETS and OMSHEETS?
Both the SHEETS and OMSHEETS functions return the number of sheets in a reference. The difference is that OMSHEETS will also count any non-worksheet objects in the reference.
What are the possible arguments for the SHEETS function?
The only argument for the SHEETS function is the reference. The reference can be a range of cells, a named range, or a workbook name.
Are there any limitations for the SHEETS function?
Yes, the SHEETS function only returns the number of sheets in a reference. It does not return the names of the sheets in the reference.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV