Hi ,
The second parameter for the VLOOKUP function is a range , over which the VLOOKUP will work ; within this range , the first column will be searched for the lookup value , and if found , the third parameter for the VLOOKUP function will be used as the column number within the range e.g. suppose we use =VLOOKUP(5,C11:K55,4,FALSE) , we are doing the following :
1. See if the value 5 ( the first parameter ) exists in the range C11:C55 ( the first column of the second parameter ).
2. If it does not exist , return a #N/A error.
3. Suppose it is found in C37 ; then return the value in F37 ( using the third parameter 4 , F37 is 4 columns from C37 ; 1 will return the value in C37 i.e. the lookup value itself , 2 will return the value from D37 , 3 will return the value from E37 and so on ). Note that the number of columns in the range C11:K55 is 9 , and so the third parameter for the VLOOKUP function cannot be 10 or more. If it is , you will get a #REF! error.
In your case , the third parameter is given by the following formula :
MATCH($B27,$42:$42,0)
This will look to see if the value in B27 ( FEB ) exists in row 42 , and if so , in which column ; if cell A42 has FEB in it , the above MATCH function will return 1 , if cell B42 has FEB in it , the MATCH function will return 2 and so on. In your case , it will return a value of 6.
The second parameter is given by :
OFFSET($1:$1,MATCH($C27,$A:$A,0),,1000)
What this does is it takes the entire first row ( $1:$1 ) as the reference point , and uses the following offsets :
A row offset given by MATCH($C27,$A:$A,0) ; this will look for the contents of C27 ( Sensar ) in column A ; since this is present in A76 , this will return a value of 76.
A column offset of 0 , since we have not used any value
The value of 1000 is just an arbitrary number which will decide the height ( number of rows ) of the range.
Putting all of the above together , the second parameter to the VLOOKUP function will be :
$77:$1076
The VLOOKUP function will now look for TM72003 ( which is the text in A27 ) in column A , starting from A77 through A1076 ; since it finds this in A85 , it will now return the value in F85 ( since F85 is 6 columns away from A85 ).
Narayan