Situation
You are asked to update a table wherein VLOOKUP function needs to be entered in hundreds of columns. It is not possible to change the formula manually in hundreds of columns to update the column index number (third parameter of Vlookup function).
Semi Dynamic Vlookup Formula
Look at the image below. We need to change the formula in each cell (C11 through E11) to update the third parameter of Vlookup formula (col_index_num).
How COLUMN function works?
It returns the column number of a cell reference.
For example, the formula =COLUMN(B1) returns 2, because column B is the second column.
Semi Dynamic Vlookup Formula
Look at the image below. We need to change the formula in each cell (C11 through E11) to update the third parameter of Vlookup formula (col_index_num).
Use the COLUMN function to increment column index number automatically by 1
How COLUMN function works?
It returns the column number of a cell reference.
For example, the formula =COLUMN(B1) returns 2, because column B is the second column.
After applying the formula in cell C11, paste the formula to the right (Select the cells C11 through C13 and press CTRL + R).
Dynamic Vlookup Formula
Suppose columns are not ordered in the table the way you want values to be returned.
Since the column index numbers are not in any proper order, we cannot use COLUMN function.
Instead we can use MATCH function to return the column index number.
Instead we can use MATCH function to return the column index number.
How MATCH function works?
The MATCH function returns the relative position of an item in an array that matches a specified value.
After applying the formula in cell C11, paste the formula to the right (Select the cells C11 through C13 and press CTRL + R).= MATCH (C10, $B$2:$E2,0) evaluates to :
= MATCH("Last Name", ("First Name","Last Name","Class","Sections"), Find the closest match)
SIR please provide excel pivot table creation with examples and v look up sir
ReplyDelete