SHEET (index of a worksheet)

<< Click to Display Table of Contents >>

SHEET (index of a worksheet)

Syntax:

SHEET([SheetName])

Description:

This 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 was previously 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 small 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 referenced cell and return the index of the worksheet with this name.

Example:

For 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. The function is unknown in older versions.

See also:

SHEETNUMBER, SHEETNAME, SHEETS, FILENAME