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.

Examples:

Based on this table:

 

A

B

C

D

1

ID

Desc

Price

Qty

2

10

Wine1

100

10

3

20

Wine2

50

3

4

30

Wine3

100

55

5

40

Wine4

100

24

6

50

Wine5

50

1

=VLookup(10, A1:B6, 2, FALSE)

would return “Wine1”

=VLookup(10, A1:C21, 3, FALSE)

would return 100

=VLookup(60, A1:B21, 2, FALSE)

would return #N/A

=VLookup(60, A1:B21, 2, TRUE)

would return “Wine5”

Vlookup – Excel Function
Tagged on: