SHEET Function in Google Sheets

If you want to know the index number of a tab in your spreadsheet, that is, its position counting from the left, the SHEET function in Google Sheets gives you exactly that.

Call it with no argument and it returns the index of the tab the formula sits on. Pass it a reference and it returns the index of the tab that reference points to. In this article I’ll show you how it works with three short examples.

SHEET Function Syntax in Google Sheets

Here is how you write the SHEET function.

=SHEET([reference])
  • reference – optional. A cell reference or a range. If you leave it out, SHEET returns the index of the tab the formula is on. If you include it, SHEET returns the index of the tab that reference belongs to.

When to Use SHEET Function

  • Find out a tab’s position number without counting tabs by hand.
  • Build formulas that change behavior depending on which tab they’re on.
  • Number your tabs automatically inside a calculation.
  • Drive other functions that need a sheet index, such as building cross-tab references.

Example 1: Get the Current Sheet Index

Let’s start with the plainest version, calling SHEET with nothing inside.

Below is the dataset, just a label in column A so the tab isn’t empty. This formula sits on the first tab of the file.

Google Sheets: A1 has 'Label', A2 has 'This tab' for the initial dataset.

The goal is to get the index number of the tab this formula lives on.

Here is the formula:

=SHEET()
Google Sheets formula bar showing the `=SHEET()` function for cell C2.

With no argument, SHEET reports the position of its own tab. This formula is on the first tab, so the result is 1.

The index counts tabs from the left, starting at 1. Move a tab to a different spot and its index changes to match the new position.

Example 2: Get the Sheet Index From a Cell Reference

You can also point SHEET at a specific cell.

Below is the dataset, a single value in column A. This time the formula lives on the second tab of the file.

Google Sheet: "Value" in A1, "Sample data" in A2 for Example 2 dataset.

The goal is to get the index of the tab that the cell A2 belongs to.

Here is the formula:

=SHEET(A2)
Google Sheets: Formula `=SHEET(A2)` for cell C2 displayed in the formula bar.

Here A2 is on the second tab, so SHEET returns 2. The reference tells SHEET which tab to look at, and it hands back that tab’s position.

Since A2 sits on the same tab as the formula, you get the same answer you’d get from a bare =SHEET() on this tab.

Pro Tip: SHEET tells you which tab a reference is on. To turn a row and column number into a full cell reference as text, pair it with the ADDRESS function.

Example 3: Use SHEET Inside a Calculation

SHEET returns a plain number, so you can drop it straight into math.

Below is the dataset, a short note in column A. This formula is on the third tab of the file.

Google Sheets dataset: "Note" in cell A1, "Index times ten" in A2.

The goal is to take the current tab’s index and multiply it by ten.

Here is the formula:

=SHEET()*10
Google Sheets: Cell C2 selected, formula bar shows `=SHEET() * 10`.

This formula sits on the third tab. SHEET with no argument grabs that tab’s position number, and multiplying by ten gives 30.

Because SHEET gives you a number, it behaves like any other value in a formula. You can add to it, multiply it, or feed it into another function.

Tips & Common Mistakes

  • The index counts tabs left to right starting at 1, not from 0. The first tab is always 1.
  • Reordering your tabs changes the numbers. If you drag a tab to a new position, its SHEET index updates to match where it now sits.
  • SHEET returns a tab’s position, not its name. If you need the column number of a reference instead, use the COLUMN function.

SHEET is a quiet little function, but it’s useful any time you need a tab’s position as a number. Whether you call it bare or hand it a reference, you get back a clean index you can use in other formulas.

Try it on a multi-tab file and watch the numbers shift as you reorder the tabs.

List of All Google Sheets Functions

Related Google Sheets Functions / Articles: