Skip to main content
← All functions

SHEETS function

Counts sheets in a reference or in the containing workbook

Returns the number of sheets in the supplied reference. When the reference argument is omitted, it counts sheets in the workbook that contains the formula.

Syntax

SHEETS([reference])

Square brackets indicate optional arguments.

Arguments

ArgumentRequiredMeaning
referenceNoOptional reference whose sheets should be counted. Omit it to count the sheets in the containing workbook.A2:A5

Try SHEETS

Count worksheets represented by a reference

=SHEETS(A2:A3)

A2:A3 is a range on one worksheet, so the result is 1 rather than the number of cells. Multi-sheet references need a workbook with multiple sheets and are outside this single-sheet sample.

Inspect the current formula

Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.

Read the formula, one argument at a time

Explore the written function calls and their inputs. The calculation result belongs to the complete formula.

SHEETS · top-level call

=SHEETS(A2:A3)

1 / 1 · reference

Optional reference whose sheets should be counted. Omit it to count the sheets in the containing workbook.

SHEETS reference ↗

Follow the cells behind a result

Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.

The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.

Reference and compatibility

Univer 1.0.4 / Apache-2.0; syntax and optional-reference note corrected against Microsoft documentation. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.