Wednesday, August 26, 2009

MS Excel vlookup Demo

=VLOOKUP(A2, 's1'!$A$2:$B$25, 2,)

Assume this is vlookup in sheet s2. A2 is the exact value searched for in the first column of the reference array.'s1'!$A$2:$B$25 is the reference array, which must include at least two columns (because have to include A2). $ in the array range is absolute, ensures that all vlookup look up from the EXACT same reference array. 2 is is the column index in the array that contains the value to be returned. In other word, vlookup finds the match A2 in the array in sheet s1 and return the value in column 2.