How to Use SHEETS Function in Excel (5 Useful Examples)

Introduction to Excel SHEETS Function

The SHEETS function is a built-in function added in the Excel 2013 version which returns the number of worksheets in a given reference or without reference.

SHEET-Function

Function Objective

To count the number of sheets

Syntax

SHEETS ([reference])

Arguments Explanation 

Argument Required/Optional Explanation
reference Optional The value for which you’ll get the number of sheets

Return Value

Sheet count (number)


Example 1 – Getting Number of Sheets without Reference Argument

To get the number of all working sheets without reference argument, use the following formula.

=SHEETS()

Getting-the-Number-of-Sheets-without-Reference-Argument


Example 2 – Finding Number of Sheets with Reference Argument

To count sheets with a reference, use the following formula.

In our example, we want to find the sheet number of cell B4 of sheet Price_Jan.

=SHEETS(Price_Jan!B4)

Finding-the-Number-of-Sheets-with-Reference-Argument


Example 3 – Tracking Number of Hidden Sheets Using The SHEETS Function

To count hidden worksheets, use the following SHEETS function with or without reference.

=SHEETS()

Tracking-the-Number-of-Hidden-Sheets-Using-the-SHEET-Function


Example 4 – Finding The Number of Sheets While Dealing 3D Reference

To count the number of working sheets for 3D reference, e.g. cell A5 from sheets Price_Jan to Sales, use the following formula.

=SHEETS(Price_Jan:Sales!A5)

Finding-the-Number-of-Sheets-While-Dealing-3D-Reference

The formula counts the number of sheets between two provided sheets (including those sheets as well), there are 5 sheets and the formula returned 5.


Example 5 – Determining The Number of Sheets Between Two Sheets 

To count the number of sheets between two specific sheets, for e.g. the number of working sheets between Price_Jan and Sales, use the following formula.

=SHEETS(Price_Jan:Sales!B5)-2

Determining-The-Number-of-Sheets-Between-Two-Sheets

The formula counts the number of sheets between two provided sheets, excluding those sheets.


Things to Remember

1. If the reference is not a valid value, the SHEETS function shows #REF! Error.

2. The SHEETS function is not available in the Object Model (OM) because similar functionality is already included in the Model.


Download Practice Workbook


<< Go Back to Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdul Kader
Md. Abdul Kader

MD. ABDUL KADER is an engineer with a talent for Excel and a passion for VBA programming. To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SWM, GIS, RS, and SPSS. He holds a B.Sc in Urban & Regional Planning from Chittagong University of Engineering and Technology and has shifted to become a content developer. In this role, he crafts technical content centred around... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo