Skip to main content

Excel INDEX function

doc index function 1

Description

Syntax and Arguments

Usage and Examples


Description

The INDEX function returns the displayed value based on a given position from a range or an array.

Syntax and Arguments

Formula syntax

=INDEX (array, row_num, [column_num], [area_num])

Arguments

  • Array: Required, a range of cells or an array of constants you retrieve from. If the array argument is a column of cells, row_num is required, if array is a row of cells, col_num is required.
  • Row_num: Required, if the array is a column of cells, the row position in the array.
  • Col_num: Required, if the array is a row of cells, the column position in the array.
  • Area_num: Optional. decide which area in the array should be used if there are more than one range in array argument.

Return Value

The INDEX function returns a value by given position from a range of cells.

Usage and Examples

Here some examples are provided to explain how to use the INDEX function.

Example 1 – Return values based on given position from a range of cells

Description Result Formula
Value in the second column in range A2:C2 Returns value in B2 =INDEX(A2:C2,2)
Value in the third row in range A2:A5 Returns value in A4 =INDEX(A2:A5,3)
Value in the intersection of the third row and second row at range A2:C5 Returns value in B5 =INDEX(A2:C5,3,2)

doc index function 2


Example 2 – Return values based on given position from an array of constants

Formula1:

=INDEX({1,2,3;"a","b","c"},2,3)

Explain:

{1,2,3;"a","b","c"}: an array with two rows and three columns, 1, 2, 3 are in the three cells of the first row, and a, b, c, are in cells of the second row.

2,3: return the value in intersection of the second row and the third column.

Return: c
doc index function 3


Formula2:

Select a column of cells and type

={INDEX({1,2,3;"a","b","c"},0,3)}

Press Shift + Ctrl + Enter keys at the same time

Explain:

{1,2,3;"a","b","c"}: an array with two rows and three columns, 1, 2, 3 are in cells of the first row, a, b, c are in cells of the second row.

0,3: list all values in the third column.

Return: 3,c
doc index function 4


Formula3:

Select a row of cells and type

={INDEX({1,2,3;"a","b","c"},2)}

Press Shift + Ctrl + Enter keys at the same time

Explain:

{1,2,3;"a","b","c"}: an array with two rows and three columns, 1, 2, 3 are in cells of the first row, a, b, c are in cells of the second row.

2: list all values in the second row.

Return: a,b,c,c
doc index function 5


Sample File
doc sample file


The Best Office Productivity Tools


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations