# MS Excel: INDEX Function (WS)

This Excel tutorial explains how to use the Excel INDEX function with syntax and examples.

## Description

The Microsoft Excel INDEX function returns either the value or the reference to a value from a table or range. There are 2 syntaxes for the INDEX funciton.

## INDEX Function (Syntax #1 - Returning a value)

The first implementation of the INDEX function returns the value from a table or range. The syntax for the Microsoft Excel INDEX function is:

`INDEX( array, row_number, [column_number] )`

### Parameters or Arguments

array is a range of cells or table.

row_number is the row number in the array to use to return the value.

column_number is optional. It is the column number in the array to use to return the value.

## Applies To

The INDEX function can be used in the following versions of Microsoft Excel:

• Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

## Type of Excel Function

The INDEX function can be used in Microsoft Excel as the following type of function:

• Worksheet function (WS)

## Example (as Worksheet Function) - Returning a value

Let's look at some Excel INDEX function examples and explore how to use the INDEX function as a worksheet function in Microsoft Excel:

Based on the spreadsheet above, the following Excel INDEX examples would return:

```=INDEX(A1:D5, 2, 3)
Result: \$3.50

=INDEX(A1:D5, 4, 1)
Result: 10569

=INDEX(A1:D5, 5, 2)
Result: 12```

## INDEX Function (Syntax #2 - Returning a Reference to a Value)

The second implementation of the INDEX function returns the reference to a value from a table or range. The syntax for the Microsoft Excel INDEX function is:

`INDEX( reference, row_number, [column_number], [area_number] )`

### Parameters or Arguments

reference is a reference to a range or group of ranges.

row_number is the row number in the range to use to return the reference.

column_number is optional. It is the column number in the range to use to return the reference.

area_number is optional. It is the range to use from the reference parameter. If this parameter is omitted, then the INDEX function will return its results for the first range listed in the reference parameter.

## Applies To

The INDEX function can be used in the following versions of Microsoft Excel:

• Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

## Type of Excel Function

The INDEX function can be used in Microsoft Excel as the following type of function:

• Worksheet function (WS)

## Example (as Worksheet Function) - Returning a Reference to a Value

Let's look at some Excel INDEX function examples and explore how to use the INDEX function as a worksheet function in Microsoft Excel:

Based on the spreadsheet above, the following Excel INDEX examples would return:

```=INDEX(A1:D5,2,3)
Result: reference to cell C2 (which contains the value of \$3.50)

=INDEX((A1:B5,C1:D5),3,2)
Result: reference to cell B3 (which contains the value of 4)

=INDEX((A1:B5,C1:D5),3,2,1)
Result: reference to cell B3 (which contains the value of 4)

=INDEX((A1:B5,C1:D5),3,2,2)
Result: reference to cell D3 (which contains the value of \$20.00)```

`=INDEX(\$F\$4:\$F\$10, MATCH("x",\$E\$4:\$E\$10))`