# SHEET Function – Get Sheet Index of a Sheet (Excel, Google Sheets)

This tutorial demonstrates how to use the Excel SHEET Function returns the index number of a sheet in Excel.

## SHEET Function Overview

The SHEET Function returns the index number of a sheet in Excel.

To use the SHEET Excel Worksheet Function, select a cell and type:

(Notice how the formula inputs appear)

## SHEET Function Syntax and Inputs:

``=SHEET([value])``

value – [optional] The value to check.

## SHEET Function

The SHEET Function returns the numeric index of a sheet in Excel.

``=SHEET()``

Notice how it returns the current sheet number if no reference is given.

## SHEET Function with Sheet Name

You can also enter a sheet name into the SHEET Function.

``=SHEET(“example1”)``

## SHEET Function with Cell Reference

If a cell reference is provided, the SHEET Function will return the sheet number of the given cell reference

``=SHEET(U8)``

## SHEET Function with a Range

You can input an entire cell range and the SHEET Function will return the sheet number of the respective cell range

``=SHEET(G3:T5)``

## Sort Sheet Index

### Excel 2019 or older

In Excel 2019 or older, all sheets can be sorted according to their index by using INDEX & MATCH Function

``=INDEX(\$A\$2:\$A\$6,MATCH(D2,\$B\$2:\$B\$6,0))``

### Excel 365

Excel 365 has a new feature: the SORT Function. To sort sheet names based on their index, use the formula:

``=SORT(A2:B6, 2)``

### Excel Practice Worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!