Excel SHEETS Function

The Excel SHEETS function, new in Excel 2013, returns a count of the number of sheets in the file or for a given reference.

Excel SHEETS Function Syntax:

=SHEETS(reference)

When reference is omitted it will count all sheets including visible, hidden, or very hidden worksheets, as well as other sheet types like macro, chart, or dialog sheets.

Note: The reference must be a contiguous range, it cannot accept references to multiple sheets. The reference can however accept a 3D named range.

Excel SHEETS Function Examples

excel sheets function

Notice the first example above returns the count of all sheets in the file because the ‘reference’ argument is omitted.

You can use SHEETS to determine if any sheets are hidden. For example, the image below shows a sheet count of 4 in cell A1, but only 3 sheets are visible:

hidden sheets

Download the Excel Example File

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.

Excel Sheets Function Related Lessons

Automatically generate a list of sheet names