Friday, May 22, 2009

VLOOKUP in Excel

In Excel, the VLookup function searches for value in the left-most column of table_array and returns the value in the same row based on the index_number.

The syntax for the VLookup function is:

VLookup( value, table_array, index_number, not_exact_match )

value is the value to search for in the first column of the table_array.

table_array is two or more columns of data that is sorted in ascending order.

index_number is the column number in table_array from which the matching value must be returned. The first column is 1.

not_exact_match determines if you are looking for an exact match based on value. Enter FALSE to find an exact match. Enter TRUE to find an approximate match, which means that if an exact match if not found, then the VLookup function will look for the next largest value that is less than value.

Note:

If index_number is less than 1, the VLookup function will return #VALUE!.

If index_number is greater than the number of columns in table_array, the VLookup function will return #REF!.

If you enter FALSE for the not_exact_match parameter and no exact match is found, then the VLookup function will return #N/A.

Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000
For example:

Let's take a look at an example:

In Sheet1 i have data like this :

And in Sheet2 i have data like this :

In data 1 there one field still empty (City Name) , and i want to know what city name in that data. so i can look at sheet2 . this is step to fill that field :

1- please arrange data in sheet2 with ascending base on ID , like this :

2- after that in sheet1 klik on data 1 for city name for the example City name on Ainun ,

3- after that write like this : =VLOOKUP(C6,Sheet2!$A$3:$C$8,2)

4- and the view is like this :

5- for data number 2 you can copy from data number 1 (City Name of Ainun) , after that paste to City Name of Najib , but please Change C6 with C7 , because Column C is the key for data in sheet2.

6- and try for the other data like above (step 5). this is final result.


No comments:

Post a Comment

masukkan nama anda

Popular Posts