What is the column index number in VLOOKUP?

A VLOOKUP is one of the most common functions in Excel. It allows you to “look up” a value in a table and return the corresponding value of another column.

VLOOKUP image

One of the trickiest parts of a VLOOKUP, however, is understanding what to put as the column index number.

Remember, a VLOOKUP function looks up a value in the leftmost column of a table and returns the corresponding value in another column of the same table. The column index number simply tells Excel from which column in the table you’d like to return a corresponding value. That “corresponding value” column is represented by the number, counting from left to right, of the column in the table.

How to Know the Column Index Number in a VLOOKUP

Check out the table below. 

If you used a VLOOKUP that took “Name” as a lookup value and highlighted the blue table as the table input for the function, you could then choose any of the numbers from 1-5 for the column index number to return a corresponding value for the name you are looking up. 

For example, a column index number of 3 returns the employee’s age, while one of 5 returns the employee’s sales.

VLOOKUP column explanation

Examples of Using the Column Index Number in a VLOOKUP

Let’s take a look at our original example.

We’d like to find the dollar amount of sales generated by the employee Paul using the blue sales table. We want the answer to appear in cell B6.

VLOOKUP first example image

In our VLOOKUP function, the “lookup” value is A6 (“Paul”), the table input is E5:F11 (the table in blue), and the column index is 2 because “Sales” is the second column in the table we’ve highlighted.

VLOOKUP second example image

Now let’s look at an example using a different table. Say we wanted to find the number of years Liam has been part of the company. Which column index number would we use if the input table is E3:I9?

VLOOKUP third example image

We’d input a column index number of 4 since “Years with Company” is the 4th column in the table:

VLOOKUP fourth example image

Column Index Number when the VLOOKUP Starts in the Middle of the Table

The table input of a VLOOKUP function doesn’t need to start at the beginning of a table. Let’s say we switched the order of the department and name columns in the previous example.

VLOOKUP middle column lookup first image

Because we’d still like to look up Liam’s years with the company, we must define our table input for the VLOOKUP with “Name” as the first column of the table.

VLOOKUP middle column second image

The column index number is the column number of the user-defined table, not the entire blue table overall.

VLOOKUP middle column third image

Because the input table in the function starts in column F and not column E, the column index number for “Years with Company” is now 3 instead of 4.

Conclusion and Issues with VLOOKUPS

In many professional spreadsheets, you’ll rarely see the column index number expressed as a standalone number typed into a formula. Instead, you’ll likely see a MATCH function in the column index number’s position in the function. 

Why?

If a column is inserted into the lookup table it can change the column index number for the answer column. For example, I inserted a “Gender” column into the table below, which now changes the proper column index number for “Years with Company” from 4 to 5:

As a result of the inserted column, the VLOOKUP would incorrectly show Liam’s gender instead of his Years of Service.

To avoid such problems, many analysts choose to write a MATCH function to dynamically select the column index number instead of typing the number into the VLOOKUP function directly or use other lookup functions entirely.

But by grasping the basics of a column index number, you can use VLOOKUP functions properly and understand the foundations for advanced Excel techniques.

Like this article? Subscribe to our free monthly newsletter for exclusive content and community events!