The Excel SHEET function returns the index number of a sheet in Excel. It will report the sheet number for a cell reference, named range, or Excel Table.
Syntax:= SHEET ([value])
The SHEET function syntax has the following arguments:
- Value Optional. Value is the name of a sheet or a reference for which you want the sheet number. If value is omitted, SHEET returns the number of the sheet that contains the function.
Example: Let’s look at some Excel SHEET function examples and explore how to use the SHEET function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following SHEET examples would return:
SHEET includes all worksheets (visible, hidden, or very hidden) in addition to all other sheet types (macro, chart, or dialog sheets).
- If the value argument is not a valid value, SHEET returns the #REF! error value. For example, =SHEET(Sheet1!#REF) will return the #REF! error value.
- If the value argument is a sheet name that is not valid, SHEET returns the #NA error value. For example =SHEET(“badSheetName”) will return the #NA error value.
SHEET is not available in the Object Model (OM) because the Object Model already includes similar functionality.