Friday, December 4, 2009

the key to understanding VLOOKUP

If you feel unsure about the VLOOKUP function, the safest approach is to keep in mind how it works. Try to picture all this in your mind. It may sound complicated in words, but the idea is not difficult.


    Imagine you are converting a student percentage mark in G4 to a letter grade.
    e.g. =VLOOKUP(G4, H1:J5, 2)
    The first two parameters of the function simply tell Excel (1) where the value is that is going to be compared to the lookup table, then (2) where the lookup table is

  • Excel goes to the TOP ROW of the FIRST COLUMN of the table (H1).

  • It checks to see whether G4is GREATER than the value in H1.

  • If G4 is greater than the value in H1, Excel moves DOWN to the next row of the table, that is, to H2.

  • Again it checks see whether G4is GREATER than the value in H@.

  • It continues doing this checking and moving down the table until it finds the value in the first row of the table that is greater than G4.

  • When G4 is greater than the value in the table, it moves back UP one row in the table.

  • It "returns" whatever it finds in the SECOND COLUMN of the table.


NOTE: When you use the fourth parameter, "FALSE," Excel only looks for an exaact match