How to use SHEETS Function in Excel

The Excel SHEETS function returns the total number of sheets in a given reference.  When no arguments are supplied SHEETS returns the total number of sheets in the workbook.

Syntax:= SHEETS ([reference])

The SHEETS function syntax has the following arguments:

  • Reference    Optional. Reference is a reference for which you want to know the number of sheets it contains. If Reference is omitted, SHEETS returns the number of sheets in the workbook that contains the function.

Example: Let’s look at some Excel SHEETS function examples and explore how to use the SHEETS function as a worksheet function in Microsoft Excel:

Syntax:  =SHEETS(Cost!A2)

Result:

SHEETS Function in Excel - How to use SHEETS Function in Excel

Based on the Excel spreadsheet above, the following SHEETS examples would return:

Syntax: =SHEETS(Cost:Sheet1!A3)
Result: 3

Syntax: =SHEETS(A4)
Result: 1

Syntax: =SHEETS(sophuc.com:Cost!A5)
Result: 2

Syntax: =SHEETS()
Result: 4

Syntax: =SHEETS(Year!A7)
Result: 1

Syntax: =SHEETS(Sheet1!B8)
Result: 1

Syntax: =SHEETS(Sheet1!C9)
Result: 1

Note:

  • If the reference is omitted, SHEETS returns total sheet count in a workbook
  • The SHEETS function includes hidden sheets in the count
  • SHEETS will report sheet count in 3D references
  • SHEET reports the index of a sheet, the SHEETS function reports the number of sheets in a reference
READ:  How to use ISNONTEXT Function in Excel

Add a Comment

Your email address will not be published. Required fields are marked *