SHEET function

SHEET returns the index number of a sheet containing a reference, or the current sheet's number if no argument is given.

=SHEET([value])

Generate a SHEET formula

Describe what you need. The generator will reach for SHEET where SHEET is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How SHEET reads its arguments
valueoptionalSHEET
ArgumentRequiredDescription
valueOptionalOptional. A cell or range reference. If omitted, returns the current sheet's number; if provided, returns the sheet number containing that reference. Must reference an existing cell or named range.

Returns

An integer representing the sheet's position in the workbook, using 1-based indexing.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Identify which sheet holds your data

AddressBedsBathsList PriceDays on Market
123 Oak St3245000015
456 Maple Ave4362500028
789 Pine Rd2132500042
=SHEET()

Result: 1

When entered in the 'Listings' sheet (the first sheet in the workbook), SHEET() returns 1. This is useful in templates to verify you're working on the correct sheet or to populate a sheet identifier for audit trails and multi-sheet reports.

2. Cross-reference data from another sheet

AddressBedsBathsList PriceDays on Market
123 Oak St3245000015
456 Maple Ave4362500028
789 Pine Rd2132500042
=SHEET(Comparables!B2)

Result: 2

If the workbook has a second sheet named 'Comparables', this formula returns 2, confirming that cell B2 exists on sheet 2. This helps track which sheet each comparable property came from when consolidating market analysis across multiple tabs.

3. Build a sheet-aware formula

AddressBedsBathsList PriceDays on Market
123 Oak St3245000015
456 Maple Ave4362500028
789 Pine Rd2132500042
=IF(SHEET()=1,INDEX(A:A,3)&" from Listings",INDEX(A:A,3)&" from Sold")

Result: 789 Pine Rd from Listings

This formula changes behavior based on the active sheet. On the 'Listings' sheet (sheet 1), it returns '789 Pine Rd from Listings'. If copied to a 'Sold' sheet (sheet 2), it automatically returns '789 Pine Rd from Sold'. Useful for automated reporting where the same formula adapts across multiple sheets.

Common errors

Which SHEET error are you seeing?
SHEET returned an error#NAME?
Upgrade to Excel 2016 or later, or switch to Google Sheets. If you must use an older version, manually maintain sheet numbers as constants in a reference cell.
#REF!
Verify the referenced sheet still exists and the cell address is valid. Update the formula to reference an existing sheet, such as =SHEET(A1) instead of =SHEET(DeletedSheet!A1).
#VALUE!
Pass only a valid cell reference or named range, like =SHEET(A1) or =SHEET(MyRange). Do not wrap references in quotes (=SHEET("A1") is wrong) or pass sheet names as strings.
ErrorWhy it happensHow to fix it
#NAME?The SHEET function is not available in your spreadsheet application, typically because you're using Excel before version 2016 or Google Sheets in a region where dynamic functions haven't been deployed.Upgrade to Excel 2016 or later, or switch to Google Sheets. If you must use an older version, manually maintain sheet numbers as constants in a reference cell.
#REF!The cell or sheet reference passed to SHEET no longer exists—the sheet was deleted, renamed, or the cell was removed from that sheet.Verify the referenced sheet still exists and the cell address is valid. Update the formula to reference an existing sheet, such as =SHEET(A1) instead of =SHEET(DeletedSheet!A1).
#VALUE!You passed an argument that SHEET cannot interpret, such as a text string literal instead of a cell reference, or an expression that evaluates to text.Pass only a valid cell reference or named range, like =SHEET(A1) or =SHEET(MyRange). Do not wrap references in quotes (=SHEET("A1") is wrong) or pass sheet names as strings.

Tips and when to use something else

  • SHEET() with no argument is faster than SHEET(A1) because it doesn't evaluate a cell—use it when you only need the current sheet number.
  • Sheet numbers always use 1-based indexing: the first sheet is 1, not 0, regardless of how tabs appear in the UI.
  • Combine SHEET() with IF to prevent accidental formula breakage when sheets are copied or reordered, or to validate that data is on the expected sheet.
  • If you need the sheet *name* instead of its number, use SHEETS() to list all names, or use CELL("filename") for the workbook path; SHEET returns only the numeric index.

Frequently asked questions

Does SHEET number sheets starting from 0 or 1?
SHEET uses 1-based indexing. The first sheet in your workbook is sheet 1, the second is sheet 2, and so on. This is consistent across both Excel and Google Sheets.
Can I use SHEET to return the sheet name instead of its number?
No, SHEET returns only the numeric index. To get a sheet name, combine SHEET with SHEETS() and INDEX, such as =INDEX(SHEETS(),SHEET()), or use CELL with "filename" to extract the workbook and sheet name.
How do I prevent a formula from breaking if someone moves it to a different sheet?
Use SHEET() in a conditional formula with IF to validate the sheet before executing. For example: =IF(SHEET()=1,formula_result,"Wrong sheet"). The formula will show an error or alternate message if copied to an unexpected sheet.
Does SHEET work with named ranges?
Yes. If you pass a named range to SHEET, it returns the sheet number where that named range is defined. For example, =SHEET(ListingsData) returns the sheet index of the sheet containing the range named 'ListingsData'.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17