Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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


Excel Productivity Tools

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 70% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.