SHEET (index of a worksheet)

<< Click to Display Table of Contents >>

SHEET (index of a worksheet)

Syntax:

SHEET([SheetName])

Description:

Returns the index of a worksheet in the current document. The first worksheet in a document returns 1, the second sheet returns 2, etc.

If the optional argument SheetName is given, the index of the worksheet with the specified name is returned. Otherwise, the index of the current worksheet is returned.

Note:

The SHEET function replaces the (almost) identical SHEETNUMBER function

Background info: The SHEETNUMBER function formerly was available in PlanMaker, but not in Excel. In Excel 2013, Microsoft introduced the same function – but with a different name: SHEET.

There is only one little difference: When the specified parameter is a cell reference, SHEET will return the index of the worksheet that contains this reference. SHEETNUMBER, on the other hand, will read the content of the corresponding cell and return the index of the worksheet carrying that name.

Example:

On the third worksheet in a document, SHEET() returns 3.

SHEET("Expenses") returns the index of the worksheet named "Expenses".

Compatibility notes:

Microsoft Excel supports this function only in version 2013 or later. In older versions, the function is unknown.

See also:

SHEETNUMBER, SHEETNAME, SHEETS, FILENAME