Excel INDEX Function - Microsoft Excel INDEX Function Tutorial

Excel INDEX Function - Microsoft Excel INDEX Function Tutorial

Excel INDEX Function - Microsoft Excel INDEX Function Tutorial

The INDEX Function returns a value from the row and column you designate within a worksheet area. It performs a table lookup just like VLOOKUP or HLOOKUP but is more powerful.

What is the Microsoft Excel INDEX Function (Array Format)?

The INDEX function is a computer program that you run from a worksheet cell formula. It returns a value from the row and column you designate within a worksheet range or array. In other words, it is table lookup just like VLOOKUP except you tell it what row and column to return information from within the table (i.e. range or array). In VLOOKUP you only told it the column to return the info from. You run the INDEX worksheet function by typing its name in a formula then followed by the information it is suppose to use. The INDEX worksheet function is used in applications when you have to look up prices, name information, scientific data anything that is contained in a table. Its advantage over VLOOKUP is that it can be used in conjunction with the MATCH function thus allowing what is looked up to be elsewhere then the first column of the range or array (i.e. table). It can also be used to merge two tables together transferring information from one to the other just like VLOOKUP.


How Do You Type the INDEX Worksheet Function in a Formula?

Whenever you type a formula in a worksheet cell, this is called syntax or grammar. The general INDEX function syntax has a format like this when you type it in a worksheet cell:

=INDEX(reference,[row_num],[column_num])

Where reference,[row_num],[column_num] are called the function argument list. Remember, you are running a computer program at this point so the program needs information to operate and that is why there is an argument list. When you see an argument list and you see square brackets [ ] around the argument name, this means the argument is optional and you do not have to include it when typing unless you need it. So for the syntax above, you need to include 2 arguments for the INDEX worksheet function when typing it in a worksheet cell formula in order for it to calculate correctly. If row_num is omitted you need to put the col_num. If the col_num argument is omitted you need to put the row_num argument. What argument values can be used are discussed below. Remember functions expect certain things in their argument lists, if you do not put the correct information in the list they will generate an error when run.


INDEX Function Argument Definitions


How Do You Run the INDEX Function?

Since the INDEX function is a computer program, it runs when you press Enter to enter the formula that contains it. If any of the arguments are wrong, the function will return an error.


What Do I Type for an INDEX Function Argument?

When typing the INDEX function in a worksheet cell formula, you need to replace the argument list with arguments separating each with a comma (,). Some typical arguments you can use are:

Cell Formula Explanation
= INDEX(G1:J5, 2, 2) Returns the value from row 2 column 2 in the designated range. Remember the row and column numbers are relative to the range not the worksheet column headers.
= SUM( INDEX( G1:J5, 0, 4 ) ) Return the entire column 4 from the designated range. Most of the time the reason why you return a whole column is to use it as input to another function like SUM. In this example INDEX is nested inside of SUM to provide it the values to sum.
= SUM( INDEX( G1:J5, 2, 0) ) Return the entire row 2 from the designated range. Most of the time the reason why you return a whole row is to use it as input to another function like SUM. In this example INDEX is nested inside of SUM to provide it the values to sum.
= INDEX( Sales, 2, 2 ) Returns the value from row 2 column 2 in the designated range named Sales.*
= Index( A1:F5, Match( "Widget1", B1:B5, 0 ), MATCH("Q4", A1:D1, 0 ) ) Nest the Match worksheet function inside the INDEX function to find the row and column number that Index will need to return a value. Notice Match is looking in the second column of the range, not the first, for the position of Widget1. It is also scanning the headers of the table for the position of Q4.

* It is possible to name a cell or group of cells on a worksheet and use that name in place of a range reference or cell reference. Consult Excel help on how to name a cell.


Additional INDEX Function Examples

The worksheet seen below contains some typical worksheet formulas that run the INDEX worksheet function. Pay close attention to the argument list and the syntax used to write the formula.

A B C D
1
2
3 Item RegionA RegionB RegionC
4 Widget1 100 200 150
5 Widget2 200 300 250
6 Widget3 300 400 350
7
8 Find Widget2,RegionA in the table which is row 3, column 2 relative to the table not columns on worksheet
9 Widget2, RegionA 200 = Index( A3:A6, 3, 2)
10
11 Use MATCH worksheet function to locate RegionB header position and Widget2 row position. Notice how MATCH function is being used to get the row and column positions for the INDEX function. Using MATCH, their positions could shift and the formula would adapt automatically.
12 Widget2, RegionB 300 = Index(A3:A6, Match( "Widget2", A3:A6, 0), Match( "RegionB", A3:D3, 0) )
13
14 Use the MATCH worksheet function to locate RegionA header position in row 3 for INDEX function and leave row index for INDEX function 0. This will return that entire column of the table that includes RegionA header. SUM function will then add the range values being returned by INDEX which is B3:B6. Do not be afraid to include headers in values being summed, SUM function ignores text. Easier to create more advanced formulas if you leverage this concept.
15 Sum of RegionA 600 = Sum(  Index( A3:A6, 0, Match( "RegionA" , A3:D3 ,0) ) )
16
17
18

Things to Know About the INDEX Function

Next Excel Training Dates - Public Training and Live Online Courses

Our next public Excel training workshops and live online Excel courses are listed below. For all of the dates and times, please visit our Training Schedule page using the link above in the main menu.

Business, Engineering and Science
Beginning Excel Training for Business Professionals Intermediate Excel Training for Business Professionals Advanced Excel Training for Business Professionals Beginning Excel VBA Training for Business Professionals Intermediate Excel VBA Training for Business Professionals Advanced Excel VBA Training for Business Professionals Advanced Excel Training for Engineers / Scientists Beginning Excel VBA Training for Engineers / Scientists Intermediate Excel VBA Training for Engineers / Scientists Advanced Excel VBA Training for Engineers / Scientists Microsoft Excel Dashboards Training for Combined Audience
Beginning Excel Training for Business
Next Date:
See Schedule
Intermediate Excel Training for Business
Next Date:
See Schedule
Advanced Excel Training for Business
Next Date:
See Schedule
Beginning Microsoft Excel VBA Training for Business
Next Date:
See Schedule
Intermediate Microsoft Excel VBA Training for Business
Next Date:
See Schedule
Advanced Microsoft Excel VBA Training for Business
Next Date:
See Schedule
Advanced Excel Training for Engineers / Scientists
Next Date:
See Schedule
Beginning Excel VBA Training for Engineers / Scientists
Next Date:
See Schedule
Intermediate Excel VBA Training for Engineers / Scientists
Next Date:
See Schedule
Advanced Excel VBA Training for Engineers / Scientists
Next Date:
See Schedule
Microsoft Excel Dashboard Training
Next Date:
See Schedule

Public Training Location

  • Santa Barbara, CA
  • Los Angeles, CA
  • Pasadena, CA
  • Reseda, CA
  • Chatsworth, CA
  • Topanga, CA
  • Santa Clarita, CA
  • Newbury Park, CA
  • Camarillo, CA
  • Calabasas, CA
  • Valencia, CA
  • West Hollywood, CA
  • Goleta, CA
  • Palmdale, CA
  • San Fernando, CA
  • Burbank, CA
  • La Canada, CA
  • Altadena, CA
  • Culver City, CA
  • Rosemead, CA
  • Anaheim, CA
  • El Segundo, CA
  • Fillmore, CA
  • Gardena, CA
  • Encino, CA
  • Oxnard, CA
  • Mojave, CA
  • La Crescenta, CA
  • Glendale, CA
  • Flintridge, CA
  • Beverly Hills
  • Arcadia, CA
  • Inglewood, CA
  • Hawthorne, CA
  • Manhattan Beach, CA
  • Santa Paula, CA
  • Century City, CA
  • Sherman Oaks, CA
  • Reseda, CA
  • Woodland Hills, CA
  • Hollywood, CA
  • Studio City, CA
  • Fillmore, CA
  • Ventura, CA
  • Moorpark, CA
  • Simi Valley, CA
  • Santa Monica, CA
  • Encino, CA

EMAGENIT performs Excel onsite company training in the cities listed above as well as the entire Northern and Southern California areas, United States and Canada.

LinkedIn
Facebook
Information
Need Help? Please call us at 1.866.924.6244

Copyright © 2002-2017

EMAGENIT All Rights Reserved