INDEX
Returns the value of a cell in a table based on the row and column numbers you specify.
INDEX(array, row_num, [column_num])Arguments
arrayThe range of cells containing your datarow_numThe row number in the array to returncolumn_numThe column number in the array to return(optional)
=INDEX(A1:C10,5,2)Returns the value in row 5, column 2 of the range
=INDEX(A:A,10)Returns the 10th value in column A
=INDEX(A1:D1,3)Returns the 3rd value in a single row
- •INDEX+MATCH is more flexible than VLOOKUP (can look left)
- •If row_num or column_num is 0, returns entire column or row
- •Great for dynamic ranges and two-way lookups
- •Hard-coding the row number instead of pairing INDEX with MATCH to find it dynamically. It works until the data moves, then it quietly returns the wrong thing
- •Swapping row_num and column_num by accident, which pulls a value from a completely different cell
- •Adding a column_num on a single-column array when it's not needed, which throws a #REF! error for no obvious reason
Why bother with INDEX and MATCH instead of just using VLOOKUP?
Because INDEX/MATCH doesn't care which side of your lookup column the answer is on - it can look up a value anywhere and pull the result from anywhere else. It also tends to run faster on big datasets and won't break the moment someone inserts a column.
What does INDEX return if row_num is 0?
The entire column pointed to by column_num (or the entire row, if you set column_num to 0 instead). Handy inside array formulas or when you need to hand a whole column to another function.
Can INDEX pull a value out of a full table, not just one row or column?
Yes - give it both row_num and column_num, like INDEX(A1:D10,5,2), and it drops you right on that one cell.
Need to translate a formula using INDEX?
Use our translator to convert your complete formula
