Check Sheet Logo
Check Sheet

SHEETS

The SHEETS function returns the number of sheets in a spreadsheet or in a referenced spreadsheet object. It is commonly used when a formula needs to count workbook tabs or validate that a referenced spreadsheet has the expected structure.

Usage

Use the SHEETS formula with the syntax shown below, it has 1 optional parameter:

=SHEETS([reference])
Parameters:
  1. reference (optional):
    An optional reference used to identify the spreadsheet or sheet collection to count. If omitted, the function returns the number of sheets in the spreadsheet containing the formula.

Examples

Here are a few example use cases that explain how to use the SHEETS formula in Google Sheets.

Count workbook tabs

Use SHEETS to return the total number of sheets in the current spreadsheet for audits, setup checks, or summary dashboards.

Validate referenced files

When working with references to other spreadsheet objects, SHEETS can help confirm how many sheets are available before relying on a linked structure.

Build workbook metadata

Combine SHEETS with other information functions to create a lightweight overview of a spreadsheet's structure.

Common Mistakes

SHEETS not working? Here are some common mistakes people make when using the SHEETS Google Sheets Formula:

Confusing SHEET and SHEETS

SHEETS returns a count of sheets, while SHEET returns the position number of a specific sheet or reference.

Using an invalid reference

If the reference does not identify a valid sheet or spreadsheet object, the formula returns an error. Check the reference syntax and that the target exists.

Expecting sheet names

The function returns a number, not the names of sheets. Use it only when a sheet count is needed.

The following functions are similar to SHEETS or are often used with it in a formula:

  • SHEET

    The SHEET function returns the numeric position of a specified sheet, table, or range within a spreadsheet. It is commonly used to identify where a reference appears in workbook order or to make formulas aware of sheet positions.

  • CELL

    The CELL formula returns information about the formatting, location, or contents of a cell. The type of information returned depends on the value of the info_type argument.

  • ISREF

    The ISREF formula is used to check if a value is a reference or not. It returns `TRUE` if the value is a reference and `FALSE` if it is not. This formula is commonly used in combination with other formulas that require a reference as input.

  • ISNUMBER

    The ISNUMBER formula is used to check if a given value is a number. It returns TRUE if the value is a number and FALSE if it is not. This formula is commonly used in data cleaning and validation to identify and remove non-numeric values or to ensure that a cell only contains a number.

Learn More

You can learn more about the SHEETS Google Sheets function on Google Support.