Note: The other languages of the website are Google-translated. Back to English

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

Kutools for Excel - Helps 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 80% time for you.

  • 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.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL