Friday, February 27, 2009

Vlookup and Match

How do you use Vlookup and Match functions to get great results.

This solution can be used when you need to get the output for a criteria that should adhere to two criterias

In the example below we see how we get the price for 1kg of a, 3kg of a, 1kg of c and 2kg of b.

e.g.

  1 2 3
a 10 20 30
b 40 50 60
c 70 80 90

FORMULA: =VLOOKUP(B12,B5:E8,MATCH(C12,B5:E5,0))

Explanation to match

Match will give you the column value to lookup. 

Syntax – MATCH(lookup_value,lookup_array,match_type)Match_type is the number -1, 0, or 1. Match_type specifies how Microsoft Excel matches lookup_value with values in lookup_array.

Output

a 1 10
a 3 30
c 1 70
b 2 50

No comments:

Post a Comment