Anda di halaman 1dari 1
www.chandoo.org Become Awesome In Excel CHEATER ® CHANDOO VLOOKUP Searches for a value in the
www.chandoo.org
Become Awesome In Excel
CHEATER
®
CHANDOO
VLOOKUP
Searches for a value in the first column of a table array and returns a value
in the same row from another column in the table array.
Vertical
D9
ƒ
x
A
B
C
D
1
2
3
Cheater
John
4
5
6
7
VLOOKUP ( lookup_value,table_array,col_index_num, range_lookup )
VLOOKUP ( lookup_value,table_array,col_index_num, range_lookup )
VLOOKUP ( lookup_value,table_array,col_index_num, range_lookup )

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

( lookup_value,table_array,col_index_num, range_lookup ) UNSORTED A B C D A B 1 Product ID Product Name
( lookup_value,table_array,col_index_num, range_lookup ) UNSORTED A B C D A B 1 Product ID Product Name

UNSORTED

A B C D A B 1 Product ID Product Name Unit Price Quantity 1
A
B
C
D
A
B
1
Product ID
Product Name Unit Price
Quantity
1
2
1001
ABC
10
12
2
Cheater
25
3
1002
BCD
20
14
When you perform a text search,
3
John
45
you should always specify FALSE
4
1006
CDE
30
16
for the range_lookup parameter.
4
Charlize
33
?
5
1007
DEF
40
16
5
George
21
6
1008
EFG
50
10
2
RESULT
=VLOOKUP (
"Cheater"
, A2:B5 , 2 )
1
2
3
4
33
INCORRECT
RESULT
=VLOOKUP (
"Cheater"
, A2:B5 , 2 , FALSE )
25
CORRECT
=VLOOKUP ( 1006 , A2:D6 ,
=VLOOKUP ( 1006 , A2:D6 ,
=VLOOKUP ( 1006 , A2:D6 ,
2
)
CDE
3
)
30
A
B
C
D
4
)
16
1
Product ID
Product Name Unit Price
Quantity
2
1001
ABC
10
12
A
B
C
D
3
1002
BCD
20
14
1
Product ID
Product Name Unit Price
Quantity
4
1006
CDE
30
16
2
1001
ABC
10
12
5
1007
DEF
40
16
3
1002
BCD
20
14
6
1008
EFG
50
10
4
1006
CDE
30
16
5
1
2
3
4
1007
DEF
40
16
=VLOOKUP(1006,A2:D6,3)*VLOOKUP(1006,A2:D6,4)
6
1008
EFG
50
10
30 *
16
=480
1
2
3
4
=VLOOKUP(1005,A2:D6,3)*VLOOKUP(1005,A2:D6,4)
20
*
14
=280
=VLOOKUP ( 1005 , A2:D6 ,
=VLOOKUP ( 1005 , A2:D6 ,
=VLOOKUP ( 1005 , A2:D6 ,
2
)
BCD
3
)
20
A
B
C
D
E
F
G
4
)
14
1
Raise
1005
is not available. Next largest value that is less than
2
Unit Price
2011
2012
Other
Year
2011
Enter
1005
is 1002. These results are from the row of 1002.
3
$10.000
$2.000
$3.000
$5.000
Unit Price
$30.000
Enter
4
=VLOOKUP ( 1005 , A2:D6 ,
=VLOOKUP ( 1005 , A2:D6 ,
=VLOOKUP ( 1005 , A2:D6 ,
2
,
TRUE )
$4.000
$6.000
$10.000
Raise
$6.000
3
,
TRUE )
$20.000
5
$30.000
$6.000
$9.000
$15.000
Total
$36.000
4
,
TRUE )
6
$40.000
$8.000
$12.000
$20.000
2
=VLOOKUP ( 1005 , A2:D6 ,
=VLOOKUP ( 1005 , A2:D6 ,
=VLOOKUP ( 1005 , A2:D6 ,
2
,
FALSE )
=VLOOKUP ( G3 , A3:D6 , IF(
G2=2011
,
3
,
FALSE )
2 , (IF( G2=2012 , 3 , 4))))
RESULT
4
,
FALSE )
$30.000
TRUE
column=2
$6.000
We don’t have an exact match.
A
B
C
D
E
F
G
A
B
C
D
1 Raise
1
Product ID
Product Name Unit Price
Quantity
2 Unit Price
2011
2012
Other
Year
2012
Enter
2
1001
ABC
10
12
3 $10.000
$2.000
$3.000
$5.000
Unit Price
$30.000
Enter
3
1002
BCD
20
14
4 $20.000
$4.000
$6.000
$10.000
Raise
$9.000
4
1006
CDE
30
16
5 $6.000
$30.000
$9.000
$15.000
Total
$39.000
5
1007
DEF
40
16
6 $8.000
$40.000
$12.000
$20.000
6
1008
EFG
50
10
3
=VLOOKUP ( G3 , A3:D6 , IF(
G2=2011
,
2 , (IF(
G2=2012
,
3 , 4))))
1
2
3
4
RESULT
2012
2012
"BCD" is not
RESULT
=VLOOKUP (
"BCD"
,
A2:D6 ,
2
)
#N/A
in the first
column
$30.000
$9.000
FALSE
TRUE
column=3
=VLOOKUP (
"BCD"
,
A2:D6 ,
3
)
#N/A
of the range
A
B
C
D
A C
B
D
E
F
G
1
Product ID
Product Name Unit Price
Quantity
1 Raise
2
1001
ABC
10
12
2 Unit Price
2011
2012
Other
Year
2015
Enter
3
1002
BCD
20
14
3 $10.000
$2.000
$3.000
$5.000
Unit Price
$40.000
Enter
4
4 $20.000
$10.000
$20.000
30
$4.000
$6.000
Raise
1006
CDE
16
5
1007
DEF
40
16
5 $30.000
$6.000
$9.000
$15.000
Total
$60.000
6
1008
EFG
50
10
6 $8.000
$40.000
$12.000
$20.000
4
1
2
3
=VLOOKUP ( G3 , A3:D6 , IF(
G2=2011
,
2 , (IF(
G2=2012
,
3 , 4))))
RESULT
=VLOOKUP ( "BCD" , B2:D6 ,
=VLOOKUP ( "BCD" , B2:D6 ,
2
)
20
2015
2015
3
)
14
RESULT
$40.000
$20.000
FALSE
FALSE
column=4
EXCEL - VLOOKUP
EXCEL - VLOOKUP

FUNCTION REFERENCE

 
 
 
 
 
 
 
 
 
 

lookup_value : Required. The value to search in the first column of the table or range. The lookup_value argument can be a value or a reference. If the value you supply for the lookup_value argument is smaller than the smallest value in the first column of the table_array argument, VLOOKUP returns the #N/A error value.

table_array : Required. The range of cells that contains the data. You can use

a

reference to a range (for example,

A2:D8), or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical

values. Uppercase and lowercase text are equivalent.

col_index_num : Required. The

column number in the table_array argument from which the matching value must be returned. A col_index_num argument of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on.

If the col_index_num argument is:

• Less than 1, VLOOKUP returns the

#VALUE! error value.

 

Greater than the number of columns in

table_array,

 

VLOOKUP returns the #REF! error value.

range_lookup : Optional. A logical value that specifies whether you want

VLOOKUP to find an exact match or an approximate match:

If range_lookup is either TRUE or is

omitted, an exact or approximate match

is

returned. If an exact match is not

found, the next largest value that is less than lookup_value is returned.

Important : If range_lookup is either

TRUE or is omitted, the values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP might not return the correct value.

If

range_lookup is FALSE, the values in

the first column of table_array do not need to be sorted.

If the range_lookup argument is FALSE,

VLOOKUP will find only an exact match.

If

there are two or more values in the first

column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, the

error value #N/A is returned.

 
 
 
 
 
 
 
 
 

When searching text values in the first

column of table_array, ensure that the data in the first column of table_array

does not contain leading spaces, trailing

spaces, inconsistent use of straight ( ' or

) and curly ( ‘ or “) quotation marks, or nonprinting characters. In these cases, VLOOKUP might return an incorrect or unexpected value.

"

When searching number or date

values, ensure that the data in the first

column of table_array is not stored as text values. In this case, VLOOKUP might return an incorrect or unexpected value.

If range_lookup is FALSE and

lookup_value is text, you can use the wildcard characters — the question mark (?) and asterisk (*) — in lookup_value. A

question mark matches any single

character; an asterisk matches any

sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the character.

0 CM 1 2 3 4 5 6 7 8 9 10 11 12 13
0 CM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Design and Layout : CheaterJohn.com
SCHOOL
FREE TO DOWNLOAD
@ WORK
For All Collections
Please Visit
®
CHEATER
Copyright © 2010, CheaterJohn.com
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means electronic, mechanical, photocopying, recording or otherwise without the prior permission of the publisher.
www.cheaterjohn.com
HOME
JOHN

COMVLOOKUP_1.2