Vlookup itself is a very useful function for Microsoft excels users. By Adding just match function to vlookup even further enhances the ability of vlookup to save lot of time.
You need to use the vlookup when you need to find things in a table or a range by row. For example, look up a price of an automotive part by the part number
There are four pieces of information that you will need in order to build the VLOOKUP syntax:
- The value you want to look up, also called the lookup value.
- The range where the lookup value is located. Remember that the lookup value should always be in the first column in the range for VLOOKUP to work correctly. For example, if your lookup value is in cell C2 then your range should start with C.
- The column number in the range that contains the return value. For example, if you specify B2: D11 as the range, you should count B as the first column, C as the second, and so on.
- Optionally, you can specify TRUE if you want an approximate match or FALSE if you want an exact match of the return value. If you don't specify anything, the default value will always be TRUE or approximate match.
Now put all of the above together as follows:
=VLOOKUP(lookup value, range containing the lookup value, the column number in the range containing the return value, optionally specify TRUE for approximate match or FALSE for an exact match).See the below example to apply vlookup
Let assume you have more than one column to lookup in any given table array and those lookup column is not even the sequence, in this case you have to change the column number every time in you formula. There is easy solution for this embedding the Match function in the vlookup for this purpose we will change the column number with the match function.
The only thing you have to be careful use the same column number as present in data table in order to find the match.
The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.