Wednesday, November 19, 2014

Copying values from a different list in EXCEL using VLOOKUP

Problem 
I have a list in excel (List A). The excel contains a code and some description.
 
I have an another second list (List B). It contains code and age.I need to fill the description from List A.  I cannot reorder the list. I need to copy the description from the first list to List B based on code.

Sample XLS

The formula used for List B description is given in the Formula column.

Formula details:

IFERROR(VLOOKUP(A18,A3:B9,2,FALSE),"")


VLOOKUP - function to lookup in a range of values
A18 [Lookup_value]-  The value to search in the first column of the table array.
A3:B9 [Table_array] - Use a reference to a range or a range name. The values in the first column of table_array are the values searched by lookup_value.
2 [Col_index_num] - The column number in table_array from which the matching value must be returned.
FALSE- A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match. FALSE specifies exact match.

IFFERROR - VLOOKUP returns error when no match.

 Reference - http://office.microsoft.com/en-001/excel-help/vlookup-HP005209335.aspx

No comments: