Friday, November 04, 2005

Comparison of 2 lists (Preparation 3)

Vlookup is the 3rd function that you need to learn. Vlookup stands for vertical lookup. What it does is that it will look up a set of values and then return the corresponding value in another column.

Header 1Header 2
Internet marketing
SynergyworksGood
ExcelWorksGood
MS Words
BloggingGood
Testing


Assuming the two list starts from Cell A1 (showing the word "Internet marketing"). The list is ranged between A1 to B5. Therefore, you could lookup the value say "ExcelWorks" and have the word "Good" returned as the results. The syntax is =Vlookup("ExcelWorks",A1:B5,2,false). What the formula meant is that look up the value/word "ExcelWorks" in the range "A1:B5",return the value in column 2 and if there is no value found, do not return the closest results. In this case the word "Good" will be returned. If you search the word Excelworking, "#N/A" which is an error value is returned.


No comments: